1. 程式人生 > >流式佈局 佈局xml

流式佈局 佈局xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:layout_height="match_parent"
    tools:context="as.bwei.com.wenhaomonikaoshi1.MainActivity">

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <FrameLayout
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content">
            <EditText
                android:id="@+id/edt"
                android:textColorHighlight="#ff44ff"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="請輸入搜尋內容"/>

        </FrameLayout>
        <Button
            android:layout_gravity="right"
            android:id="@+id/but"
            android:background="#808080"
            android:textSize="20dp"
            android:text="搜尋"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <as.bwei.com.wenhaomonikaoshi1.widget.CustomView
        android:id="@+id/af1_cotent"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"></as.bwei.com.wenhaomonikaoshi1.widget.CustomView>

</LinearLayout>