android - Settings show in Samsung emulator but not on actual device -


I have a problem that is finding me difficult to troubleshoot. I have created an app where my menu setup is The way is:

  & lt; Menu xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: tool = "http://schemas.android.com/tools" tool: reference = "com.brainbox.dropnotelitealpha. App.MainActivity "& gt; & Lt; item android: id = "@ + id / action_settings" Android: title = "@ string / action_settings" Android: orderInCategory = "1" Android: showAsAction = "never" /> & Lt; item android: id = "@ + id / action_logout" Android: title = "logout" Android: orderInCategory = "2" android: showAsAction = "never" /> & Lt; / Menu & gt;   

I can access items by pressing the Overflow icon in the Actionbar. The problem I have is that when I test an app on Samsung S4, the overflow icon is not displayed. If I use an emulator, or any other device, the overflow is displayed as desired.

Do anyone have any ideas, which can prevent the menu display? Oh, this only happens when the menu items are set to Android: showAsAction = "never".

TIA

Change your code to it and check that it is fixed:

  & lt; Menu xmlns: android = "http://schemas.android.com/apk/res/android" Xmlns: tools = "http://schemas.android.com/tools" tool: reference = "com.brainbox.dropnotelitealpha. App.MainActivity "& gt; & Lt; item android: id = "@ + id / action_settings" Android: title = "@ string / verb_settings" Android: orderInCategory = "1" Android: showAsAction = "ifRoom" /> & Lt; item android: id = "@ + id / action_logout" Android: title = "logout" Android: orderInCategory = "2" Android: showAsAction = "ifRoom" /> & Lt; / Menu & gt;    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -