我有一个照片共享应用程序,在所有布局中显示底部菜单显示底部菜单栏的键 android 谢谢
menu.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_bookmark"
android:icon="@drawable/icon_bookmark"
android:title="Bookmark" />
<item android:id="@+id/menu_share"
android:icon="@drawable/icon_share"
android:title="Share" />
<item android:id="@+id/menu_delete"
android:icon="@drawable/icon_delete"
android:title="Delete" />
</menu>
activity.java
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
MenuInflater menuInflater = getMenuInflater();
menuInflater.inflate(R.layout.menu, menu);
return true;
}