I am trying to create a TextView in a menu, the text should be set dynamically. Right now, my menu has the following:
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_search" android:actionViewClass="android.widget.SearchView" android:icon="@android:drawable/ic_menu_search" android:showAsAction="ifRoom" android:title="Search"/> <item android:id="@+id/action_sync" android:icon="@drawable/ic_menu_refresh" android:showAsAction="ifRoom" android:title="Sync"/> </menu>
How to create an element with text?
source share