diff options
Diffstat (limited to 'sample/src/main')
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 1 | ||||
-rw-r--r-- | sample/src/main/res/menu/menu_main.xml | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt index 2914824..a6f4b92 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt @@ -122,6 +122,7 @@ class MainActivity : KPrefActivity() { override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu_main, menu) + return true } diff --git a/sample/src/main/res/menu/menu_main.xml b/sample/src/main/res/menu/menu_main.xml index dd07031..3bfc3d2 100644 --- a/sample/src/main/res/menu/menu_main.xml +++ b/sample/src/main/res/menu/menu_main.xml @@ -2,20 +2,31 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.pitchedapps.myapplication.MainActivity"> + + <item + android:id="@+id/action_search" + android:orderInCategory="90" + android:title="@string/kau_search" + app:showAsAction="always|collapseActionView" + app:actionViewClass="android.support.v7.widget.SearchView" /> + <item android:id="@+id/action_settings" android:orderInCategory="100" android:title="@string/kau_settings" app:showAsAction="never" /> + <item android:id="@+id/action_email" android:orderInCategory="200" android:title="@string/kau_send_feedback" app:showAsAction="never" /> + <item android:id="@+id/test" android:orderInCategory="300" android:title="@string/kau_menu" app:showAsAction="never" /> + </menu> |