1
在我的应用程序中,我想使用没有titelbar或操作栏的活动。我解决了这个:在没有硬件键的设备上打开选项菜单
<activity
android:name="com.cilenco.lockscreen.Position"
android:label="@string/title_activity_position"
android:theme="@android:style/Theme.Light.NoTitleBar" >
<intent-filter>
<action android:name="com.cilenco.lockscreen.Position" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
我现在的问题是,我必须使用选项菜单,如果我跑我的设备上的应用程序无需硬件密钥无法打开选项菜单。我以为我会在后面和主键是但不可见的栏中的3点按钮(溢出菜单)。我能做些什么来打开没有硬件键的设备上的选项菜单?
非常感谢你! targetSdkVersion是个问题。感谢那。 – Cilenco
很高兴听到,不客气! – bricklore
@bricklore当minSdkVersion为16时,程序开启OptionsMenu的方式。看起来如果minSdkVersion大于8,openOptionsMenu将不起作用 – LoveForDroid