京东布局

京东首页布局
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="#ff3660"
            android:gravity="center_vertical"
            android:orientation="horizontal">


            <ImageView
                android:id="@+id/ivZxing"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginLeft="15dp"
                android:background="@drawable/a_s"/>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="30dp"
                android:layout_marginLeft="15dp"
                android:layout_marginRight="15dp"
                android:layout_weight="1"
                android:background="@drawable/shape_search"></LinearLayout>

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_alignParentRight="true"
                android:layout_marginRight="15dp"
                android:background="@drawable/my_msg_bai"/>
        </LinearLayout>

        <com.youth.banner.Banner
            android:id="@+id/banner"
            android:layout_width="match_parent"
            android:layout_height="200dp"/>

        <android.support.v7.widget.RecyclerView
            android:id="@+id/rvClass"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
        </android.support.v7.widget.RecyclerView>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:layout_margin="15dp"
            android:background="@drawable/shape_search"
            >

            <TextView
                android:id="@+id/tvJD"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginLeft="10dp"
                android:text="京东快报"/>

            <LinearLayout
                android:id="@+id/llMore"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="10dp"
                android:orientation="horizontal">

                <View
                    android:layout_width="1dp"
                    android:layout_height="match_parent"
                    android:background="#000000"></View>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="5dp"
                    android:text="更多"/>
            </LinearLayout>

            <com.sunfusheng.marqueeview.MarqueeView
                android:id="@+id/marqueeView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginLeft="15dp"
                android:layout_toLeftOf="@id/llMore"
                android:layout_toRightOf="@id/tvJD"
                app:mvAnimDuration="1000"
                app:mvDirection="bottom_to_top"
                app:mvInterval="3000"
                app:mvSingleLine="true"
                app:mvTextColor="#000000"
                app:mvTextSize="14sp"/>
        </RelativeLayout>

        <android.support.v7.widget.RecyclerView
            android:id="@+id/rvSecKill"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
        </android.support.v7.widget.RecyclerView>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:background="#33000000"
            android:gravity="center"
            android:text="为您推荐"/>

        <android.support.v7.widget.RecyclerView
            android:id="@+id/rvRecommend"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
        </android.support.v7.widget.RecyclerView>
    </LinearLayout>
</ScrollView>
 
 

京东分类布局

<?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:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:background="#ff3660"
        android:gravity="center_vertical"
        android:orientation="horizontal">


        <ImageView
            android:id="@+id/ivZxing"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_marginLeft="15dp"
            android:background="@drawable/a_s"/>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:layout_weight="1"
            android:background="@drawable/shape_search"></LinearLayout>

        <ImageView
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_alignParentRight="true"
            android:layout_marginRight="15dp"
            android:background="@drawable/my_msg_bai"/>
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/rvLeft"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="3"></android.support.v7.widget.RecyclerView>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="7"
            android:orientation="vertical">

            <ImageView
                android:id="@+id/iv"
                android:layout_width="match_parent"
                android:layout_height="150dp"/>

            <ExpandableListView
                android:id="@+id/elv"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                ></ExpandableListView>
        </LinearLayout>


    </LinearLayout>
</LinearLayout>


猜你喜欢

转载自blog.csdn.net/qq_40702815/article/details/80282928