Reputation: 2463
how to make vertical align button android in android XML file like the image
Upvotes: 1
Views: 989
Reputation: 1615
If you use android:background and put a picture like this button in the drawables you will can make it for example:
android:background="@drawable/my_button"
Upvotes: 0
Reputation: 50578
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="fill_parent"></Button>
</LinearLayout>
Use fill_parent for layout_height. For OK you can make it K below O, but like on the picture must use background image.
Upvotes: 2
Reputation: 8321
You can make height more and width less that ways the size of button will come up the way you want and for the "ok" thing, you will have to create it as the background image.
Upvotes: 0