防新闻头条视频管道(布局)

drawable类 有两个xml文件:
第一个xml;
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle"

    >
    <solid android:color="#FF0080" /> <!-- 定义填充的颜色值 -->
    <padding
        android:bottom="2dp"
        android:left="2dp"
        android:right="2dp"
        android:top="2dp" />
    <!-- 设置圆角矩形 -->
    <corners android:radius="100dp" />
    <stroke android:width="2dp" android:color="#FFFF00" />
</shape>

第二个xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<padding
    android:bottom="2dp"
    android:left="2dp"
    android:right="2dp"
    android:top="2dp" />
<!-- 设置圆角矩形 -->
<corners android:radius="1dp" />
<stroke android:width="0.5dp" android:color="#000000" />
</shape>

layout下 有两个xml文件:

第一个主布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#ffffff"
    android:orientation="vertical"
    tools:context="com.example.video_.MainActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:gravity="center"
        android:orientation="horizontal">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center|left"
            android:paddingLeft="20dp"
            android:text="我的频道" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center_vertical|left"
            android:paddingLeft="10dp"
            android:text="长按拖拽替换位置"
            android:textSize="15sp" />

        <TextView
            android:id="@+id/edit"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:background="@drawable/redsharp"
            android:gravity="center"
            android:paddingLeft="20dp"
            android:paddingRight="20dp"
            android:text="编辑"
            android:textSize="15sp" />


    </LinearLayout>

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

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

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

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:gravity="center"
        android:orientation="horizontal">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center|left"
            android:paddingLeft="20dp"
            android:text="其他频道" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center_vertical|left"
            android:paddingLeft="10dp"
            android:text="点击添加替换我的频道中"
            android:textSize="15sp" />


    </LinearLayout>

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

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


</LinearLayout>
 第二个xml:
 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/channel_rl"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginBottom="5dp"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp"
    android:layout_marginTop="5dp"
    android:background="@drawable/sharp"

    >

    <TextView
        android:id="@+id/channel_tv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center"
        android:paddingLeft="5dp"
        android:paddingRight="5dp"
        android:text="fdsgfdgdfgdfg"
        android:textSize="16sp" />

    <TextView
        android:id="@+id/delete_tv"
        android:layout_width="15dp"
        android:layout_height="15dp"
        android:background="@mipmap/delete" />
</RelativeLayout>
还要添加一个  点击完成 出现一个图片在文字上面  点击可以位置向下移动
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值