testhome_bar.xml 2.13 KB
Newer Older
konghaorui committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="48dp"
    android:orientation="horizontal">

    <View
        android:id="@+id/v_bg"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:background="@drawable/testhome_bg" />

    <LinearLayout
        android:id="@+id/ll_bar_root"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/img_back"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="15dp"
            android:background="@drawable/testhome_back" />

        <RelativeLayout
            android:id="@+id/rl_search"
            android:layout_width="0px"
            android:layout_height="32dp"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="15dp"
            android:layout_weight="1"
            android:background="@drawable/testhome_bar_search_bg"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:drawableLeft="@drawable/testhome_search"
                android:drawablePadding="4dp"
                android:hint="输入关键字查找测评"
                android:textColorHint="#B3ffffff"
                android:textSize="12dp" />
        </RelativeLayout>

        <ImageView
            android:id="@+id/img_mine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:padding="5dp"
            android:src="@drawable/testhome_mine" />
    </LinearLayout>
</FrameLayout>