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):
Try App: actionLayout =" @ layout / check " android: actionLayout = "@ layout / check" instead of . If you are using ActionbarSherlock or AppCompat , then android: Nameshot will not work
Comments
Post a Comment