android - How can I make my 3 imagebuttons to be horizontally alignedinside my footer without being scaled when I change device? -


i have footer, need place 3 buttons horizontally (left, center , right - divide width of screen in 3 pieces each 1 each button, margins between buttons). need put 1 image cover each button, , buttons should have shape images have (not scaled). problem have, use imagebuttons in order put image on each button , when change device see how looks there, see buttons scaled. annoying , don't know do. use weightsum. code this:

<relativelayout      android:id="@+id/footer"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:padding="15dp"     android:layout_alignparentbottom="true"     android:background="@color/black">       <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:weightsum="3">           <imagebutton             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/imagebutton1"             android:background="@drawable/image1"             android:layout_gravity="left"             android:layout_marginright="20dp"             android:layout_weight="1"/>           <imagebutton             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/imagebutton2"             android:background="@drawable/image2"             android:layout_gravity="left"             android:layout_marginright="20dp"             android:layout_weight="1"/>           <imagebutton             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/imagebutton3"             android:background="@drawable/image3"             android:layout_gravity="right"             android:layout_weight="1"/>       </linearlayout>   </relativelayout> 

even that, in current device, have put specific margins between buttons in order not see images scaled. , not sure if scaled @ end.

i 1 solution make me able have 3 images not scaled in device , have margin should have in each device, according size of each device.

thank in advance!!


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -