Newer
Older
dxcgt_app / app / src / main / res / layout / main.xml
wangxitong on 12 Jan 2021 9 KB first commit
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:cgt="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#CCCCCC" >

    <LinearLayout
        android:id="@+id/layout_foot"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:background="#EEEEEE"
        android:orientation="vertical"
        android:padding="5dp" >
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_gravity="center">
        <RelativeLayout
            android:id="@+id/rl_home"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:gravity="center"
            android:clickable="true">
            <ImageView
                android:id="@+id/iv_home"
                android:src="@drawable/main_home1"
                android:layout_width="24dp"
                android:layout_centerHorizontal="true"
                android:layout_height="24dp" />
            <TextView
                android:id="@+id/tv_home"
                android:textColor="#43607E"
                android:textSize="10sp"
                android:text="首页"
                android:layout_below="@+id/iv_home"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_gravity="center_horizontal"/>
        </RelativeLayout>
        <RelativeLayout
            android:id="@+id/btn_MsgAlert"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:layout_marginLeft="62dp"
            android:gravity="center"
            android:clickable="true">
            <ImageView
                android:id="@+id/iv_msg"
                android:src="@drawable/main_message"
                android:layout_width="24dp"
                android:layout_centerHorizontal="true"
                android:layout_height="24dp" />
            <TextView
                android:id="@+id/tv_msg"
                android:textColor="#333333"
                android:textSize="10sp"
                android:text="消息"
                android:layout_below="@+id/iv_msg"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_gravity="center_horizontal"/>
        </RelativeLayout>
        <RelativeLayout
            android:id="@+id/txlPhone"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:layout_marginLeft="62dp"
            android:gravity="center"
            android:clickable="true">
            <ImageView
                android:id="@+id/iv_phone"
                android:src="@drawable/main_dial"
                android:layout_width="24dp"
                android:layout_centerHorizontal="true"
                android:layout_height="24dp" />
            <TextView
                android:id="@+id/tv_phone"
                android:textColor="#333333"
                android:textSize="10sp"
                android:text="通讯录"
                android:layout_below="@+id/iv_phone"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_gravity="center_horizontal"/>
        </RelativeLayout>
        <RelativeLayout
            android:id="@+id/btn_Me"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:layout_marginLeft="62dp"
            android:gravity="center"
            android:clickable="true">
            <ImageView
                android:id="@+id/iv_me"
                android:src="@drawable/main_me"
                android:layout_width="24dp"
                android:layout_centerHorizontal="true"
                android:layout_height="24dp" />
            <TextView
                android:id="@+id/tv_me"
                android:textColor="#333333"
                android:textSize="10sp"
                android:text="我的"
                android:layout_below="@+id/iv_me"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_gravity="center_horizontal"/>
        </RelativeLayout>

    </LinearLayout>


        <com.smartdot.cgt.view.PageControlView
            android:id="@+id/pageControlView"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:layout_gravity="center"
            android:gravity="center"
            android:visibility="gone">
        </com.smartdot.cgt.view.PageControlView>
    </LinearLayout>

    <TextView
        android:id="@+id/textline"
        android:layout_width="match_parent"
        android:layout_height="0.8dp"
        android:layout_above="@+id/layout_foot"
        android:layout_alignParentLeft="true"
        android:background="#CCCCCC" />

    <RelativeLayout
        android:id="@+id/layout_title"
        android:layout_alignParentTop="true"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentLeft="true"
        android:background="#43607E" >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_centerInParent="true"
            android:text="首 页"
            android:textColor="@android:color/white"
            android:textSize="22sp" />
    </RelativeLayout>
    <RelativeLayout
        android:id="@+id/layout_head"
        android:layout_width="match_parent"
        android:layout_height="180dp"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/layout_title"
        android:background="#7F93A8" >
        <TextView
            android:id="@+id/main_headId"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/main_user"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="10dp"
            android:text="@string/main_head"
            android:textColor="@android:color/white"
            android:textSize="22sp" />
        <TextView
            android:id="@+id/main_headId1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/main_headId"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="2dp"
            android:text="@string/main_head"
            android:textColor="#cccccc"
            android:textSize="16sp" />

        <ImageView
            android:id="@+id/imgMessage"
            android:layout_width="20dp"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:layout_marginLeft="15dp"
            android:layout_marginTop="5dp"  android:visibility="gone"
            android:src="@drawable/main_message_img" />

        <ImageView
            android:id="@+id/main_user"
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="20dp"
            android:src="@drawable/main_user" />

        <ImageView
            android:id="@+id/newimgMessage"
            android:layout_width="5dp"
            android:layout_height="5dp"
            android:layout_alignTop="@+id/imgMessage"
            android:layout_marginTop="5dp"  android:visibility="gone"
            android:layout_toRightOf="@+id/imgMessage"
            android:src="@drawable/main_new_message_img" />
    </RelativeLayout>

    <LinearLayout
        android:id="@+id/layout_middle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/textline"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/layout_head"
        android:orientation="vertical" >

        <android.support.v4.view.ViewPager
            android:id="@+id/viewpager"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_weight="1.0"
            android:background="#f0f0f0"
            android:flipInterval="30"
            android:persistentDrawingCache="animation" />
    </LinearLayout>
    <TextView
        android:layout_width="match_parent"
        android:layout_height="0.8dp"
        android:layout_below="@+id/layout_foot"
        android:layout_alignParentLeft="true"
        android:background="#CCCCCC" />
</RelativeLayout>