android - Holo theme make my button bigger -
i have little concern when applying holo theme on devices api >= version 11 custom buttons bigger (in height, width seems same)
this without holo them 
this holo them 
may tell me causing this? , if possible keep same button size without holo theme?
ps: button shape:
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="#f000" /> <stroke android:width="1px" android:color="#bb000000" /> <padding android:bottom="7dp" android:left="10dp" android:right="10dp" android:top="7dp" /> <corners android:bottomleftradius="5dp" android:bottomrightradius="5dp" android:topleftradius="5dp" android:toprightradius="5dp" /> <gradient android:angle="90" android:centercolor="#5b5bcd" android:endcolor="#6f6fcf" android:startcolor="#4747e0" android:type="linear" /> </shape> and how apply on button (that in linear hirozontal linearlayout weight of 0.8)
<button android:id="@+id/addplayer" android:layout_width="0px" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginleft="5dp" android:layout_weight="0.8" android:background="@drawable/blue_button_selector" android:text="add player" /> thank you!!
android's holo theme sets minwidth , minheight in system styles.xml resource holo.widget.button specifies rules in addition used non-holo button, widget.button. small button title, button take 64x48dip in android 4.2.
<button android:id="@+id/sample_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="z" android:padding="6dp" android:minheight="1dp" android:minwidth="1dp" android:layout_marginbottom="6dp" android:layout_marginright="6dp" style="@style/custombutton" android:textsize="16sp" />
Comments
Post a Comment