Partially visible Action Mode Icons android -
i have update android support library com.android.support:appcompat-v7:25.3.1 com.android.support:appcompat-v7:26.0.1. changed appearance of action mode icons. half-visible/pressed shown in picture.
is bug in support library or doing wrong?
here how set icons of action mode.
@override public boolean oncreateactionmode(android.view.actionmode mode, menu menu) { menu.add("delete").seticon(r.drawable.ic_action_discard); menu.add("copy").seticon(r.drawable.ic_action_copy); return true; } update
i have verified bug in android support library.
here link https://issuetracker.google.com/issues/64207386
update
google updated new release. recent support library revisions page.
bug fixes
menu icons flattened on support library 26.0.0
chances there it's becuase of less height icons require.
you can try this.
add these 2 lines in values -> styles.xml -> apptheme (style name must
apptheme).<item name="android:actionbuttonstyle">@style/actionbuttonsize</item> <item name="actionbuttonstyle">@style/actionbuttonsize</item>and copy style (in same styles.xml).
<style name="actionbuttonsize" parent="widget.appcompat.actionbutton"> <item name="android:minwidth">30dp</item> <item name="android:maxwidth">48dp</item> <item name="android:width">38dp</item> <item name="android:minheight">30dp</item> <item name="android:maxheight">48dp</item> <item name="android:height">38dp</item> </style>
also, sizes given here can small or large i've not tested them set/adjust them according requirement.
and yes, if doesn't work, please let me know, i'll provide more help.

Comments
Post a Comment