-1
我已經創建了導航抽屜,並使用以下文件從它獲取值。Retriving Values form databse to set Item Title in menu.xml
以下是我menu.xml文件文件:
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Home -->
<item
android:id="@+id/home"
android:icon="@drawable/home"
android:showAsAction="ifRoom"
android:title="Home"/>
<!-- Manage Expences-->
<item
android:id="@+id/expences"
android:icon="@drawable/expence"
android:showAsAction="ifRoom"
android:title="Manage Expences"/>
<!--Manage Banking -->
<item
android:id="@+id/bank"
android:icon="@drawable/bank"
android:showAsAction="ifRoom"
android:title="Manage Banking"/>
<!-- Settings -->
<item
android:id="@+id/settings"
android:icon="@drawable/settings"
android:showAsAction="never"
android:title="Settings"/>
<!-- Exit -->
<item
android:id="@+id/exit"
android:icon="@drawable/exit"
android:showAsAction="never"
android:title="Exit"/>
如果我想設定的項目從數據庫中獲取價值的題目?
可能的[Android的重複 - 如何動態更改onOptionsItemsSelected或onCreateOptionsMenu之外的菜單項文本](http://stackoverflow.com/questions/7066657/android-how-to-dynamically-change-menu-item-text -out-side-of-onoptionsitemssele) –
http://stackoverflow.com/questions/7066657/android-how-to-dynamically-change-menu-item-text-outside-of-onoptionsitemssele –