├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── arrays.xml │ │ │ ├── drawable │ │ │ │ └── custom_channel_item_bg.xml │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── cm │ │ │ └── channlemanagerview │ │ │ └── MainActivity.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── cm │ │ │ └── channlemanagerview │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── cm │ │ └── channlemanagerview │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── channeltagviewLib ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── attr.xml │ │ │ ├── drawable │ │ │ │ ├── channel_item_draging.xml │ │ │ │ ├── error_drawable_circle.xml │ │ │ │ ├── channel_item_bg.xml │ │ │ │ ├── fixed_item_bg.xml │ │ │ │ └── error_inside.xml │ │ │ └── layout │ │ │ │ ├── item_mulite_banner.xml │ │ │ │ ├── float_item_view.xml │ │ │ │ ├── item_channel_view.xml │ │ │ │ └── channel_tag_layout.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── zhl │ │ │ └── channeltagview │ │ │ ├── bean │ │ │ ├── ChannelItem.java │ │ │ └── GroupItem.java │ │ │ ├── listener │ │ │ ├── OnChannelItemClicklistener.java │ │ │ └── UserActionListener.java │ │ │ ├── adapter │ │ │ ├── GroupedGridLayoutManager.java │ │ │ └── GroupedListAdapter.java │ │ │ ├── view │ │ │ ├── FloatItemViewManager.java │ │ │ ├── FloatItemView.java │ │ │ └── ChannelTagView.java │ │ │ └── util │ │ │ └── MeasureUtil.java │ └── test │ │ └── java │ │ └── com │ │ └── zhl │ │ └── channeltagview │ │ └── ExampleUnitTest.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── GIF.gif ├── show.mp4 ├── show_category.png ├── .idea ├── copyright │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── README.md ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /channeltagviewLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':channeltagviewLib' 2 | -------------------------------------------------------------------------------- /GIF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/GIF.gif -------------------------------------------------------------------------------- /show.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/show.mp4 -------------------------------------------------------------------------------- /show_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/show_category.png -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /channeltagviewLib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ChannelTagView 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilylong/ChannelTagView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ChannelManagerView 3 | Hello world! 4 | Settings 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Mar 15 12:38:28 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 15sp 6 | 7 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/java/com/zhl/channeltagview/bean/ChannelItem.java: -------------------------------------------------------------------------------- 1 | package com.zhl.channeltagview.bean; 2 | 3 | /** 4 | * 描述:频道bean 5 | * Created by zhaohl on 2017-3-7. 6 | */ 7 | public class ChannelItem { 8 | public int id; 9 | public int iconResid; 10 | public String category; 11 | public String title; 12 | } 13 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/res/drawable/channel_item_draging.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #64ce9d 4 | #8dbece 5 | #33000001 6 | #00000000 7 | #ffffff 8 | #efefef 9 | #de6262 10 | #4c4b4b 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/com/cm/channlemanagerview/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.cm.channlemanagerview; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /channeltagviewLib/src/test/java/com/zhl/channeltagview/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.zhl.channeltagview; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/res/layout/item_mulite_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/res/layout/float_item_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/res/drawable/error_drawable_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/java/com/zhl/channeltagview/bean/GroupItem.java: -------------------------------------------------------------------------------- 1 | package com.zhl.channeltagview.bean; 2 | 3 | import java.util.ArrayList; 4 | 5 | /** 6 | * 描述: 7 | * Created by zhaohl on 2017-5-11. 8 | */ 9 | 10 | public class GroupItem { 11 | public String category; 12 | private ArrayList channelItems = new ArrayList<>(); 13 | 14 | public ArrayList getChannelItems() { 15 | return channelItems; 16 | } 17 | 18 | public void setChannelItems(ArrayList channelItems) { 19 | this.channelItems = channelItems; 20 | } 21 | public void addChanelItem(ChannelItem item){ 22 | if(channelItems!=null){ 23 | channelItems.add(item); 24 | } 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/custom_channel_item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/res/drawable/channel_item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #64ce9d 4 | #8dbece 5 | #17b6e2 6 | #ffffff 7 | #000000 8 | #ff0c0c 9 | #989898 10 | #8dbece 11 | #c8c9ca 12 | #338e8e91 13 | #33000001 14 | #4ea6ed 15 | 16 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/res/drawable/fixed_item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/java/com/zhl/channeltagview/listener/OnChannelItemClicklistener.java: -------------------------------------------------------------------------------- 1 | package com.zhl.channeltagview.listener; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * 描述:频道item点击事件回调接口 7 | * Created by zhaohl on 2017-3-7. 8 | */ 9 | 10 | public interface OnChannelItemClicklistener { 11 | /** 12 | * 已选中频道item点击监听回调 13 | * 14 | * @param itemView 15 | * @param position 16 | */ 17 | public void onAddedChannelItemClick(View itemView, int position); 18 | 19 | /** 20 | * 未选中频道item点击监听回调 21 | * 22 | * @param itemView 23 | * @param position 24 | */ 25 | public void onUnAddedChannelItemClick(View itemView, int position); 26 | 27 | /** 28 | * item icon 点击监听回调 29 | * 30 | * @param itemView 31 | * @param position 32 | */ 33 | public void onItemDrawableClickListener(View itemView, int position); 34 | } 35 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/cm/channlemanagerview/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.cm.channlemanagerview; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.cm.channlemanagerview", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /channeltagviewLib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'com.github.dcendents.android-maven' 3 | group='com.github.yilylong' 4 | android { 5 | compileSdkVersion 25 6 | buildToolsVersion "25.0.2" 7 | 8 | defaultConfig { 9 | minSdkVersion 15 10 | targetSdkVersion 25 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | compile 'com.android.support:appcompat-v7:25.3.0' 25 | compile 'com.android.support:recyclerview-v7:25.3.0' 26 | compile 'com.zhy:base-rvadapter:3.0.3' 27 | compile 'cn.bingoogolapple:bga-badgeview:1.1.3@aar' 28 | compile 'com.github.donkingliang:GroupedRecyclerViewAdapter:1.0.1' 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/java/com/zhl/channeltagview/listener/UserActionListener.java: -------------------------------------------------------------------------------- 1 | package com.zhl.channeltagview.listener; 2 | 3 | import android.view.View; 4 | 5 | import com.zhl.channeltagview.bean.ChannelItem; 6 | 7 | import java.util.ArrayList; 8 | 9 | /** 10 | * 描述:针对已添加频道的用户操作回调 11 | * Created by zhaohl on 2017-3-13. 12 | */ 13 | 14 | public interface UserActionListener { 15 | /** 16 | * 拖动完成 17 | * @param fromPos 拖动起始位置 18 | * @param toPos 拖动结束位置 19 | * @param addedChannels 拖动完成后频道数据集合 20 | */ 21 | public void onMoved(int fromPos, int toPos, ArrayList addedChannels); 22 | 23 | /** 24 | * 侧滑删除后 25 | * @param position 删除的positon 26 | * @param itemView 当前拖动itemview 27 | * @param addedChannels 删除positon项后的已添加频道数据集合 28 | * @param unAddedChannels 删除positon项后的未添加频道数据集合 29 | */ 30 | public void onSwiped(int position, View itemView, ArrayList addedChannels, ArrayList unAddedChannels); 31 | } 32 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\work\AndroidSDK/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 热点 7 | 宏观 8 | 头条 9 | 商业 10 | 财经 11 | 直播 12 | 军事 13 | 14 | 证券 15 | 股票 16 | 彩票 17 | 18 | 本地 19 | 健康 20 | 教育 21 | 家居 22 | 亲子 23 | 时尚 24 | 健身 25 | 读书 26 | 萌宠 27 | 28 | 数码 29 | 电影 30 | 旅游 31 | 游戏 32 | 33 | 科技 34 | 历史 35 | 体育 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /channeltagviewLib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\work\AndroidSDK/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![](https://jitpack.io/v/yilylong/ChannelTagView.svg)](https://jitpack.io/#yilylong/ChannelTagView) 2 | # ChannelTagView 3 | 4 | 一个频道管理view,可拖拽排序,滑动删除。 5 | ---- 6 | 7 | 8 | 9 | 使用 10 | -- 11 | step1.Add it in your root build.gradle at the end of repositories: 12 | - 13 | 14 | allprojects { 15 | repositories { 16 | ... 17 | maven { url 'https://www.jitpack.io' } 18 | } 19 | } 20 | 21 | stpe2.Add the dependency: 22 | - 23 | dependencies { 24 | compile 'com.github.yilylong:ChannelTagView:v1.0.1' 25 | } 26 | 27 | 28 | xml中直接引用: 29 | 30 | 37 | 38 | 39 | 调用 ChannelTagView的initChannels() 方法填充数据即可。有针对里面的item修改的各种属性,针对点击事件和用户的拖动滑动事件接口监听。 40 | 4.4一下可能需要权限,详情查看demo 41 | 42 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | defaultConfig { 7 | applicationId "com.cm.channlemanagerview" 8 | minSdkVersion 15 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile 'com.android.support:appcompat-v7:25.3.0' 28 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 29 | testCompile 'junit:junit:4.12' 30 | compile project(':channeltagviewLib') 31 | } 32 | -------------------------------------------------------------------------------- /channeltagviewLib/src/main/res/values/attr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 |