频道管理-----全部布局

Main

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <ImageView
            android:id="@+id/btn_add_chan"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:padding="17dp"
            android:src="@drawable/btn_add"/>
        
        <android.support.design.widget.TabLayout
            android:id="@+id/tab_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/btn_add_chan"/>
    </RelativeLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/vp_news"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
</LinearLayout>

news

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">

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

</LinearLayout>

chan

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <RelativeLayout
        android:padding="10dp"
        android:background="#1880e1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="排序"
            android:textSize="25sp"
            android:layout_centerInParent="true"/>

        <TextView
            android:id="@+id/text_finish"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="编辑"
            android:background="#0521f5"
            android:padding="5dp"
            android:textSize="25sp"
            android:layout_alignParentRight="true"/>

    </RelativeLayout>

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

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="10dp"
                android:text="我的频道"/>
            <com.example.pindao.view.MyGridView
                android:id="@+id/mgv_my_chan"
                android:numColumns="4"
                android:verticalSpacing="5dp"
                android:horizontalSpacing="5dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            </com.example.pindao.view.MyGridView>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="10dp"
                android:text="点击添加栏目"/>
            <com.example.pindao.view.MyGridView
                android:id="@+id/mgv_recommond_chan"
                android:numColumns="4"
                android:verticalSpacing="5dp"
                android:horizontalSpacing="5dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            </com.example.pindao.view.MyGridView>
        </LinearLayout>

    </ScrollView>
</LinearLayout>

myChan

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/text_name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:gravity="center"
        android:background="@drawable/bg_chan"/>

    <ImageView
        android:id="@+id/img_delete_chan"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:visibility="gone"
        android:src="@drawable/img_delete"/>

</RelativeLayout>

recommond

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/text_name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:gravity="center"
        android:background="@drawable/bg_chan"/>

</RelativeLayout>


圆角按钮

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#ffffff"/>
    <stroke android:width="1px"
        android:color="#a39e9e"></stroke>
    <corners android:radius="10dp"></corners>
</shape>

猜你喜欢

转载自blog.csdn.net/yz1743585120/article/details/82797169