Skip to content Skip to sidebar Skip to footer

Android - Set Switch Button Into Action Bar With Showasaction="never"

I want to put a switch button into MenuItem with showAsAction='never' but it's not working. Here is my layout

Of course, It won't show up. Perhaps you should use other options to show, always or ifRoom.

Solution 2:

This line code

android:orientation="vertical"

is used with LinearLayout not with RelativeLayout

Solution 3:

why are you using app:showAsAction="Never"?? for that you can also use app:showAsAction="ifRoom" or app:showAsAction="ifRoom|collapseActionView"

Post a Comment for "Android - Set Switch Button Into Action Bar With Showasaction="never""