开发者

how to create Vertical align android button in xml..?

how to make ver开发者_高级运维tical align button android in android XML file like the image

how to create Vertical align android button in xml..?


<?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.


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"


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜