<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>
<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"/>
'/src/(packagename)/(acitivityname).java'
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_about:
// About option clicked.
return true;
case R.id.action_exit:
// Exit option clicked.
return true;
case R.id.action_settings:
// Settings option clicked.
return true;
default:
return super.onOptionsItemSelected(item);
}
}