Wednesday, 18 September 2013

increase button width with screen size

increase button width with screen size

I have 3 buttons inside a horizontal layout that fills the whole screen.
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="100dp"
android:layout_height="50dp"
android:text="1" </>
Button 2
android:layout_width="100dp"
android:layout_height="50dp"
android:text="2"</>
Button 3
android:layout_width="100dp"
android:layout_height="50dp"
android:text="3"</>
My 2 problems are, how can I make the right button stick to the right edge
of the screen without modifying it's width and how can I make button
number 2 fill the vaccant space between button 1 and 3 without modifying
its width?

No comments:

Post a Comment