Posts

Showing posts from March, 2022

How to Create ImageButton With same Height and Width in Same Distance in Android

Image
In android or in any mobile application ,It is required that layout design of application is  fit in all size of mobile screen.So for that some time we need  calculation.  Here i provide code which not need any calculation. ImageButton  with fix Height and Width. If you don't want the buttons to scale, but adjust the spacing between the buttons (equal spacing between all buttons), you can use views with weight="1" which will fill the space between the buttons:     <LinearLayout android :id ="@+id/linearLayout" android :layout_width ="match_parent" android :layout_height ="50dp" android :orientation ="horizontal" android :background ="@color/splash_background_color" > < Space android :layout_width ="0dp" android :layout_height ="1dp" android :layout_weight ="1" ></ Space > < ImageButton android :id ="...