android - Standard ActionBar icon without default left-margin / padding -
with holo theme api level > 14 retrieve kown left margin icon in actionbar
follows:
<style name="appbasetheme" parent="@android:style/theme.holo">
when applying material-theme appcompat_v7 support (not changing code or using preferred new toolbar
instead) left margin missing.
<style name="appbasetheme" parent="@style/themeoverlay.appcompat.dark.actionbar">
why , how fix ?
as first workaround added layer list drawable resource named icon.xml res/drawable/ this:
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/ic_launcher" android:left="20dp"/> </layer-list>
and referenced drawable logo instead of original icon in androidmanifest.xml:
<activity android:logo="@drawable/icon" ...
Comments
Post a Comment