Newer
Older
DownApp / app / src / main / res / layout / activity_list.xml
Bello on 11 Apr 2018 3 KB 搜索优化
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/pageBg"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:id="@+id/back_image"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:orientation="horizontal"
            android:padding="5dp">

            <ImageView
                android:layout_width="20dp"
                android:layout_height="30dp"
                android:padding="5dp"
                android:src="@drawable/ic_left_arrow"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:text="返回"/>
        </LinearLayout>

        <TextView
            android:id="@+id/top_title_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:textColor="#333333"
            android:textSize="16sp"/>

        <ImageView
            android:id="@+id/top_search"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:padding="5dp"
            android:visibility="gone"
            android:layout_marginRight="5dp"
            android:layout_centerVertical="true"
            android:layout_alignParentRight="true"
            android:src="@drawable/ic_search"/>

    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/search_layout"
        android:layout_width="match_parent"
        android:visibility="gone"
        android:layout_height="wrap_content"
        android:padding="10dp">

        <Button
            android:id="@+id/search_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:background="@drawable/shape_btn"
            android:minHeight="0dp"
            android:paddingBottom="5dp"
            android:paddingTop="5dp"
            android:text="搜索"
            android:textColor="#ffffff"/>

        <EditText
            android:id="@+id/search_edit"
            android:layout_width="match_parent"
            android:lines="1"
            android:maxLines="1"
            android:inputType="text"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginRight="10dp"
            android:imeOptions="actionDone"
            android:textSize="14sp"
            android:textColor="#00a3ef"
            android:layout_toLeftOf="@+id/search_btn"
            android:background="@drawable/shape_edit"
            android:padding="5dp"/>

    </RelativeLayout>

    <com.handmark.pulltorefresh.library.PullToRefreshListView
        android:id="@+id/app_list_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</LinearLayout>