频道管理(ChannelManager)之简易版

这篇博客展示了如何在Android中实现简单的频道管理,包括我的频道和其它频道之间的数据交换,但不包含拖拽移动功能。通过自定义MyGridView控件、适配器以及其他相关代码,实现在两个GridView间点击移动频道条目的效果。
摘要由CSDN通过智能技术生成
[html]  view plain   copy
  1. <span style="font-size:14px;">此篇幅是关于频道管理的简单效果展示,主要实现了我的频道和其他频道的点击相互数据交换效果,里面没有涉及拖拽移动效果。  
  2.   
  3.   
  4.   
  5. 1.activity_main.xml  的布局 :  
  6.   
  7. <?xml version="1.0" encoding="utf-8"?>  
  8. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  9.     xmlns:app="http://schemas.android.com/apk/res-auto"  
  10.     xmlns:tools="http://schemas.android.com/tools"  
  11.     android:layout_width="match_parent"  
  12.     android:layout_height="match_parent"  
  13.     tools:context="likaihu.com.baway.yuekao_a.MainActivity">  
  14.   
  15.   
  16.     <ScrollView  
  17.         android:layout_width="fill_parent"  
  18.         android:layout_height="fill_parent"  
  19.         >  
  20.   
  21.         <LinearLayout  
  22.             android:id="@+id/subscribe_main_layout"  
  23.             android:layout_width="fill_parent"  
  24.             android:layout_height="wrap_content"  
  25.             android:orientation="vertical"  
  26.             android:paddingBottom="14.0dip" >  
  27.   
  28.             <LinearLayout  
  29.                 android:layout_width="fill_parent"  
  30.                 android:layout_height="wrap_content"  
  31.                 android:layout_marginLeft="10.0dip"  
  32.                 android:layout_marginTop="14.0dip"  
  33.                 android:gravity="bottom"  
  34.                 android:orientation="horizontal" >  
  35.   
  36.   
  37.                 <TextView  
  38.                     android:id="@+id/my_category_tip_text"  
  39.                     android:layout_width="wrap_content"  
  40.                     android:layout_height="wrap_content"  
  41.                     android:textSize="13sp"  
  42.                     android:text="我的频道"  
  43.                     />  
  44.             </LinearLayout>  
  45.   
  46.             <View  
  47.                 android:id="@+id/seperate_line"  
  48.                 android:layout_width="match_parent"  
  49.                 android:layout_marginTop="10dp"  
  50.                 android:layout_height="0.5dp"  
  51.                 android:layout_marginBottom="14.0dip"  
  52.                 android:background="#ABADAC"  
  53.              />  
  54.   
  55.             <likaihu.com.MyGridView  
  56.                 android:id="@+id/userGridView"  
  57.                 android:layout_width="fill_parent"  
  58.                 android:layout_height="wrap_content"  
  59.                 android:layout_marginLeft="14dip"  
  60.                 android:layout_marginRight="14dip"  
  61.                 android:gravity="center"  
  62.                 android:horizontalSpacing="14dip"  
  63.                 android:numColumns="4"  
  64.                 android:scrollbars="vertical"  
  65.                 android:stretchMode="columnWidth"  
  66.                 android:verticalSpacing="14.0px" />  
  67.   
  68.   
  69.   
  70.             <View  
  71.                 android:id="@+id/seperate_line2"  
  72.                 android:layout_marginTop
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值