I want to make the button to fill always 50%
from the width of the screen, as when I rotate the device horizontally or vertically always the button fill 50%
from the width.
Tap the Gear icon that appears at the top of the Android keyboard. Open Preferences. Tap the Keyboard Height option. You'll see seven different options ranging from "Extra-short" to "Extra-tall." The default is "Normal." Tap the option you prefer.
android:layout_height. Specifies the basic height of the view. android:layout_width. Specifies the basic width of the view.
This should be possible by using weightSum and layout_weight:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="fill_parent" android:orientation="horizontal" android:weightSum="1.0"> <Button android:id="@+id/textbox3" android:layout_height="wrap_content" android:layout_weight=".5" android:layout_width="0dip" android:textSize="12sp" /> </LinearLayout>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With