android - actionlayout on menuitem does nothing -


I am setting an action on the menu item and setting the background color and image, but it is not respected . In my activity, I have:

  getMenuInflater (). Flood (rmenu submit_action, menu);   

My deposit_app is:

  & lt; Menu xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: app = "http://schemas.android.com/apk/res-auto" & gt; & Lt; Android Android: ID = "@ + ID / Action_Submit" Android: Action Layout = "@ Layout / Check" App: ShowAsaction = "Always" /> & Lt; / Menu & gt;   

My check layout

  & lt; Relative layout xmlns: android = "http://schemas.android.com/apk/res/android" Style Android: Android: ATR / ActionButton Style "Android: Layout_Wind =" Fell_Parent "Android: Layout_Height =" Fell_Parent "Android: Background = "# E8A8A8" Android: Clickable = "True" Android: Content Dictionary = "LOOL">  & L t; / RelativeLayout & gt;   

But with all these setups, how is it that the action bar is displayed, my menu is not showing at all (but it is not there Because it responds to clicks, but it does not appear):

here Enter image details

Try App: actionLayout =" @ layout / check " android: actionLayout = "@ layout / check" instead of .

If you are using ActionbarSherlock or AppCompat , then android: Nameshot will not work

menu This is because s is because these libraries use custom features that mimic the Android API because they were not present in earlier versions of the framework.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -