Posts

Showing posts with the label options menu fragment

Options Menu Fragment - Kotlin

Image
Options Menu Fragment - Android Studio - Kotlin This will cover the followings: ✓Use Options Menu / Actionbar menu ✓Use Options Menu in fragments ✓Add items with icons in options menu ✓Show different options of an options menu in each fragment ✓Handle options menu's item clicks >>Watch For Java Video: Step 1:  Create a new Project   or   open new project Step 2: Code menu_main.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" > <item android:id= "@+id/action_settings" android:title= "Settings" /> <item android:id= "@+id/action_sort" android:title= "Sort" android:icon= "@drawable/ic_sort_white" app:showAsAction= "always" /> </menu> FragmentOne.kt ...

Options Menu Fragment - Java

Image
Options Menu Fragment - Android Studio - Java This will cover the followings: ✓Use Options Menu / Actionbar menu ✓Use Options Menu in fragments ✓Add items with icons in options menu ✓Show different options of an options menu in each fragment ✓Handle options menu's item clicks >>Watch For Koltin Video: Step 1:  Create a new project   OR   Open your project Step 2: Code: menu_main.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" > <item android:id= "@+id/action_settings" android:title= "Settings" /> <item android:id= "@+id/action_sort" android:title= "Sort" app:showAsAction= "always" android:icon= "@drawable/ic_sort_white" /> </menu> FragmentOne.java...