我需要添加facebook喜欢在设置菜单如下图像.so如何添加新项目设置菜单我试图解决这个问题,只有我已经找到设置菜单res> values> string.xml>设置菜单。如何将新项目添加到Android的设置菜单?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<menu>
<item
android:id="@+id/action_settings"
android:orderInCategory="1"
android:showAsAction="never"
android:title="Settings"/>
<item
android:id="@+id/action_about"
android:orderInCategory="2"
android:showAsAction="never"
android:title="About"/>
<item
android:id="@+id/action_exit"
android:orderInCategory="3"
android:showAsAction="never"
android:title="Exit"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:id="@+id/web_engine"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</WebView>
也许水库 - >排列 - >菜单?或res - > menu - > main_activity? –
也许这将帮助http://stackoverflow.com/questions/7133141/android-changing-option-menu-items-programmatically – Gina