android layout 将EditText 和Button放在同一行

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content" android:orientation="horizontal"
    android:layout_width="fill_parent">

    <Button
        android:text="浏览" 
        android:id="@+id/Button01"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true">
    </Button>

    <EditText 
        android:id="@+id/EditText01"
        android:layout_height="wrap_content" 
        android:layout_toLeftOf="@id/Button01"
      android:layout_width="fill_parent">
    </EditText>

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@id/EditText01"
        android:text="@string/hello" />
</RelativeLayout>
  

  

posted @ 2013-11-29 23:25  observer & executive  阅读(1404)  评论(0编辑  收藏  举报