首页实现_旅游直播实现

来源:互联网 发布:淘宝流量来源怎么获取? 编辑:程序博客网 时间:2024/05/17 06:40

这里写图片描述
fragment_main.xml

<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:orientation="vertical">    <android.support.v4.view.ViewPager        android:id="@+id/vpager_main_header_ad"        android:layout_width="match_parent"        android:layout_height="120dp"></android.support.v4.view.ViewPager>    <include        layout="@layout/main_search"        android:layout_width="match_parent"        android:layout_height="wrap_content"></include>    <ImageView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:layout_marginTop="80dp"        android:src="@mipmap/nav_header_index" />    <ScrollView        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_below="@+id/vpager_main_header_ad"        android:layout_marginTop="10dp">        <RelativeLayout            android:layout_width="match_parent"            android:layout_height="wrap_content">            <android.support.v7.widget.RecyclerView                android:id="@+id/recycleview_main_menu"                android:layout_width="match_parent"                android:layout_height="wrap_content">            </android.support.v7.widget.RecyclerView>            <View                android:id="@+id/view1"                android:layout_width="match_parent"                android:layout_height="1dp"                android:layout_below="@+id/recycleview_main_menu"                android:layout_marginLeft="10dp"                android:layout_marginRight="10dp"                android:layout_marginTop="10dp"                android:background="#d8dde1" />            <android.support.v7.widget.RecyclerView                android:id="@+id/recycleview_second_menu"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_below="@+id/view1">            </android.support.v7.widget.RecyclerView>            <View                android:id="@+id/view2"                android:layout_width="match_parent"                android:layout_height="1dp"                android:layout_below="@+id/recycleview_second_menu"                android:layout_marginLeft="10dp"                android:layout_marginRight="10dp"                android:layout_marginTop="10dp"                android:background="#d8dde1" />            <!--旅游热讯-->            <LinearLayout                android:id="@+id/main_tra_hot_info"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_below="@id/view2"                android:layout_marginTop="10dp"                android:gravity="center"                android:orientation="horizontal">                <ImageView                    android:layout_width="100dp"                    android:layout_height="30dp"                    android:src="@mipmap/main_hot_news" />                <TextView                    android:layout_width="0dp"                    android:layout_height="wrap_content"                    android:layout_weight="1"                    android:text="秋天真的来了,吃火锅就按这个火锅地图走"                    android:textColor="#000000" />            </LinearLayout>            <!--特价区域-->            <LinearLayout                android:id="@+id/main_sail"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_below="@+id/main_tra_hot_info"                android:layout_marginLeft="5dp"                android:layout_marginRight="5dp"                android:layout_marginTop="10dp"                android:orientation="vertical">                <LinearLayout                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:orientation="horizontal">                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="120dp"                        android:layout_weight="1.5"                        android:src="@mipmap/main_spread1" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="120dp"                        android:layout_marginLeft="5dp"                        android:layout_weight="1"                        android:src="@mipmap/main_spread2" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="120dp"                        android:layout_marginLeft="1dp"                        android:layout_weight="1"                        android:src="@mipmap/main_spread3" />                </LinearLayout>                <ImageView                    android:layout_width="match_parent"                    android:layout_height="120dp"                    android:layout_marginTop="5dp"                    android:background="@mipmap/main_spread4" />            </LinearLayout>            <RelativeLayout                android:id="@+id/main_online"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_below="@+id/main_sail"                android:layout_marginLeft="10dp"                android:gravity="center">                <ImageView                    android:id="@+id/img_online_icon"                    android:layout_width="wrap_content"                    android:layout_height="wrap_content"                    android:layout_centerHorizontal="true"                    android:src="@mipmap/main_travle_online" />                <TextView                    android:layout_width="wrap_content"                    android:layout_height="wrap_content"                    android:layout_marginLeft="5dp"                    android:layout_toRightOf="@+id/img_online_icon"                    android:text="旅行直播"                    android:textColor="#000000" />            </RelativeLayout>            <LinearLayout                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_below="@+id/main_online"                android:layout_marginLeft="10dp"                android:layout_marginRight="10dp"                android:layout_marginTop="10dp"                android:orientation="horizontal">                <RelativeLayout                    android:layout_width="wrap_content"                    android:layout_height="wrap_content"                    android:layout_marginBottom="10dp"                    android:layout_weight="1">                    <ImageView                        android:layout_width="match_parent"                        android:layout_height="120dp"                        android:background="@mipmap/main_travle_online_pic" />                    <LinearLayout                        android:layout_width="match_parent"                        android:layout_height="wrap_content"                        android:layout_marginTop="10dp"                        android:gravity="center"                        android:orientation="vertical">                        <TextView                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:text="发现美国好东西"                            android:textColor="#ffffff"                            android:textSize="20sp" />                        <TextView                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_marginTop="10dp"                            android:text="资深老师解析,互动发红包"                            android:textColor="#ffffff" />                        <ImageView                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_marginTop="20dp"                            android:src="@mipmap/main_travle_online_play" />                    </LinearLayout>                </RelativeLayout>                <RelativeLayout                    android:layout_width="wrap_content"                    android:layout_height="wrap_content"                    android:layout_marginBottom="10dp"                    android:layout_marginLeft="2dp"                    android:layout_weight="1">                    <ImageView                        android:layout_width="match_parent"                        android:layout_height="120dp"                        android:background="@mipmap/main_travle_online_pic2" />                    <LinearLayout                        android:layout_width="match_parent"                        android:layout_height="wrap_content"                        android:layout_marginTop="10dp"                        android:gravity="center"                        android:orientation="vertical">                        <TextView                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:text="SPC首次直播"                            android:textColor="#ffffff"                            android:textSize="20sp" />                        <TextView                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_marginTop="10dp"                            android:text="北京长安酒店,耀动帝都"                            android:textColor="#ffffff" />                        <ImageView                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_marginTop="20dp"                            android:src="@mipmap/main_travle_online_play" />                    </LinearLayout>                </RelativeLayout>            </LinearLayout>        </RelativeLayout>    </ScrollView></RelativeLayout>
原创粉丝点击