android - Different behaviour from button images -
following previous question, fitting 3 buttons , background image in android, have wanted, there minor issue don't understand. there 3 buttons,each button image, 3 images have same size, shown differently. image 2 starts @ left border, images 1 , 3 have margin @ left side.
from xml file, don't see reason that:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:weightsum="4" > <imageview android:id="@+id/imageview01" android:layout_width="match_parent" android:layout_height="5dp" android:layout_weight="0.5" android:scaletype="fitxy" android:src="@drawable/sector1" /> <button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:drawableleft="@drawable/agenda_izq" android:maxlines="1" android:text="agenda" /> <button android:id="@+id/button2" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:background="@color/fondo" android:drawableleft="@drawable/actividades_izq" android:maxlines="1" android:text="actividades" /> <button android:id="@+id/button3" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:drawableleft="@drawable/suscribete_izq" android:gravity="left|center_vertical|center_horizontal" android:maxlines="2" android:text="recibir informaciĆ³n de juventud" /> <imageview android:id="@+id/imageview1" android:layout_width="match_parent" android:layout_height="5dp" android:layout_weight="0.5" android:scaletype="fitxy" android:src="@drawable/sector3" /> </linearlayout>
i 3 images start left border, without margin.
thank you.
your second image linked left no margin because line:
android:background="@color/fondo"
Comments
Post a Comment