- <span style="font-size:14px;">此篇幅是关于频道管理的简单效果展示,主要实现了我的频道和其他频道的点击相互数据交换效果,里面没有涉及拖拽移动效果。
- 1.activity_main.xml 的布局 :
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout 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"
- tools:context="likaihu.com.baway.yuekao_a.MainActivity">
- <ScrollView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
- <LinearLayout
- android:id="@+id/subscribe_main_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingBottom="14.0dip" >
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10.0dip"
- android:layout_marginTop="14.0dip"
- android:gravity="bottom"
- android:orientation="horizontal" >
- <TextView
- android:id="@+id/my_category_tip_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="13sp"
- android:text="我的频道"
- />
- </LinearLayout>
- <View
- android:id="@+id/seperate_line"
- android:layout_width="match_parent"
- android:layout_marginTop="10dp"
- android:layout_height="0.5dp"
- android:layout_marginBottom="14.0dip"
- android:background="#ABADAC"
- />
- <likaihu.com.MyGridView
- android:id="@+id/userGridView"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="14dip"
- android:layout_marginRight="14dip"
- android:gravity="center"
- android:horizontalSpacing="14dip"
- android:numColumns="4"
- android:scrollbars="vertical"
- android:stretchMode="columnWidth"
- android:verticalSpacing="14.0px" />
- <View
- android:id="@+id/seperate_line2"
- android:layout_marginTop
频道管理(ChannelManager)之简易版
最新推荐文章于 2022-03-08 23:42:59 发布
这篇博客展示了如何在Android中实现简单的频道管理,包括我的频道和其它频道之间的数据交换,但不包含拖拽移动功能。通过自定义MyGridView控件、适配器以及其他相关代码,实现在两个GridView间点击移动频道条目的效果。
摘要由CSDN通过智能技术生成