├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── Sample ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── shape_line.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── layout_tab_0.xml │ │ │ │ ├── item_selector.xml │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── rock │ │ │ │ └── android │ │ │ │ └── tagselectorview │ │ │ │ ├── MyDataBean.java │ │ │ │ ├── CustomAdapter.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── rock │ │ │ └── android │ │ │ └── tagselectorview │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── rock │ │ └── android │ │ └── tagselectorview │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── tagselector ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── attrs.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── arrow_top.png │ │ │ │ ├── arrow_bottom.png │ │ │ │ ├── select_item.png │ │ │ │ └── horizontal_line.xml │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable │ │ │ │ ├── shape_transparent.xml │ │ │ │ ├── vertical_line.xml │ │ │ │ └── selector_item_select.xml │ │ │ ├── anim │ │ │ │ ├── ts_content_in.xml │ │ │ │ └── ts_content_out.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── item_tag_selector.xml │ │ │ │ └── layout_tag_selector_view.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── rock │ │ │ └── android │ │ │ └── tagselector │ │ │ ├── interfaces │ │ │ ├── SelectorAdapter.java │ │ │ ├── ITagSelector.java │ │ │ └── ITagSelectorTabView.java │ │ │ ├── Utils.java │ │ │ ├── model │ │ │ ├── DataBean.java │ │ │ └── Tags.java │ │ │ ├── LogUtil.java │ │ │ └── views │ │ │ ├── CheckableLinearLayout.java │ │ │ ├── BaseSelectorAdapter.java │ │ │ ├── SimpleSingleSelectListView.java │ │ │ ├── TagSelectorTabTabView.java │ │ │ └── TagSelectView.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── rock │ │ │ └── android │ │ │ └── tagselector │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── rock │ │ └── android │ │ └── tagselector │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gif ├── gif2.gif └── sample.gif ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /.idea/.name: -------------------------------------------------------------------------------- 1 | TagSelectorView -------------------------------------------------------------------------------- /Sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /tagselector/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':Sample', ':tagselector' 2 | -------------------------------------------------------------------------------- /gif/gif2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/gif/gif2.gif -------------------------------------------------------------------------------- /gif/sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/gif/sample.gif -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TagSelectorView 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /tagselector/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TagSelector 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /Sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/Sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/Sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/Sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/Sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/Sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tagselector/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/tagselector/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /tagselector/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/tagselector/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /tagselector/src/main/res/drawable-xhdpi/arrow_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/tagselector/src/main/res/drawable-xhdpi/arrow_top.png -------------------------------------------------------------------------------- /tagselector/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/tagselector/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tagselector/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/tagselector/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tagselector/src/main/res/drawable-xhdpi/arrow_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/tagselector/src/main/res/drawable-xhdpi/arrow_bottom.png -------------------------------------------------------------------------------- /tagselector/src/main/res/drawable-xhdpi/select_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/tagselector/src/main/res/drawable-xhdpi/select_item.png -------------------------------------------------------------------------------- /tagselector/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rock610/TagSelectorView/HEAD/tagselector/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tagselector/src/main/res/drawable/shape_transparent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tagselector/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tagselector/src/main/res/drawable/vertical_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Sample/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Sample/src/main/res/drawable-xhdpi/shape_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Sample/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /tagselector/src/main/res/drawable-xhdpi/horizontal_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tagselector/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Apr 06 10:55:42 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 | -------------------------------------------------------------------------------- /tagselector/src/main/res/anim/ts_content_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /tagselector/src/main/res/anim/ts_content_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /tagselector/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #dedede 8 | 9 | #333333 10 | 11 | -------------------------------------------------------------------------------- /Sample/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /tagselector/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /tagselector/src/main/res/drawable/selector_item_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tagselector/src/test/java/com/rock/android/tagselector/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselector; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /Sample/src/test/java/com/rock/android/tagselectorview/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselectorview; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /Sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tagselector/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tagselector/src/androidTest/java/com/rock/android/tagselector/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselector; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /Sample/src/androidTest/java/com/rock/android/tagselectorview/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselectorview; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /tagselector/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sample/src/main/java/com/rock/android/tagselectorview/MyDataBean.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselectorview; 2 | 3 | import com.rock.android.tagselector.model.DataBean; 4 | 5 | /** 6 | * Created by rock on 16/7/4. 7 | */ 8 | public class MyDataBean extends DataBean { 9 | 10 | int id; 11 | 12 | public MyDataBean(String name) { 13 | super(name); 14 | } 15 | 16 | public MyDataBean(String name, int id) { 17 | super(name); 18 | this.id = id; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tagselector/src/main/java/com/rock/android/tagselector/interfaces/SelectorAdapter.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselector.interfaces; 2 | 3 | import com.rock.android.tagselector.model.DataBean; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by rock on 16/7/5. 9 | */ 10 | public interface SelectorAdapter { 11 | 12 | void setData(List list); 13 | 14 | List getData(); 15 | 16 | void notifyDataSetChanged(); 17 | 18 | int getItemHeight(); 19 | } 20 | -------------------------------------------------------------------------------- /tagselector/src/main/java/com/rock/android/tagselector/Utils.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselector; 2 | 3 | import android.content.Context; 4 | import android.util.TypedValue; 5 | 6 | /** 7 | * Created by rock on 16/7/4. 8 | */ 9 | public class Utils { 10 | 11 | public static int dp2px(Context context, int dp) { 12 | 13 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, 14 | context.getApplicationContext().getResources().getDisplayMetrics()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tagselector/src/main/java/com/rock/android/tagselector/model/DataBean.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselector.model; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by rock on 16/7/4. 7 | * 8 | * 模拟后台来的数据 9 | */ 10 | public class DataBean implements Serializable{ 11 | 12 | 13 | private static final long serialVersionUID = 4602009937739085873L; 14 | 15 | public DataBean(String name) { 16 | this.name = name; 17 | } 18 | 19 | public DataBean() { 20 | } 21 | 22 | public String name; 23 | } 24 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /Sample/src/main/res/layout/layout_tab_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /Sample/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 /Users/rock/Documents/ROCK/android-sdk-macosx/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 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /tagselector/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 /Users/rock/Documents/ROCK/android-sdk-macosx/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 | -------------------------------------------------------------------------------- /Sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Sample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion '25.0.0' 6 | 7 | defaultConfig { 8 | applicationId "com.rock.android.tagselectorview" 9 | minSdkVersion 14 10 | targetSdkVersion 23 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(dir: 'libs', include: ['*.jar']) 24 | testCompile 'junit:junit:4.12' 25 | compile 'com.android.support:appcompat-v7:23.2.1' 26 | compile project(':tagselector') 27 | } 28 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | -------------------------------------------------------------------------------- /Sample/src/main/res/layout/item_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /tagselector/src/main/java/com/rock/android/tagselector/LogUtil.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselector; 2 | 3 | import android.util.Log; 4 | 5 | /** 6 | * Created by rock on 16/7/12. 7 | */ 8 | public class LogUtil { 9 | 10 | public static final boolean DEBUG = false; 11 | 12 | public static void e(String tag,Object o){ 13 | if(DEBUG){ 14 | Log.e(tag,String.valueOf(o)); 15 | } 16 | } 17 | 18 | public static void d(String tag,Object o){ 19 | if(DEBUG){ 20 | Log.d(tag,String.valueOf(o)); 21 | } 22 | } 23 | 24 | public static void print(String tag,Object o){ 25 | if(DEBUG){ 26 | System.out.println(tag+"---"+o); 27 | } 28 | } 29 | 30 | public static void print(Object o){ 31 | if(DEBUG){ 32 | System.out.println(o); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /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 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /tagselector/src/main/java/com/rock/android/tagselector/interfaces/ITagSelector.java: -------------------------------------------------------------------------------- 1 | package com.rock.android.tagselector.interfaces; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by rock on 16/7/4. 7 | */ 8 | public interface ITagSelector { 9 | 10 | interface OnItemClickListener{ 11 | void onItemClick(int position); 12 | } 13 | 14 | void setData(List list); 15 | 16 | void refresh(); 17 | 18 | List getData(); 19 | 20 | String getCheckedName(); 21 | 22 | void setOnItemClickListener(OnItemClickListener listener); 23 | 24 | T getDataByPosition(int position); 25 | 26 | int selectedPosition(); 27 | 28 | /** 29 | * item的高度,默认以itemHeight*itemCount 为动画行驶的高度 30 | * */ 31 | int itemHeight(); 32 | /** 33 | * 自定义动画行驶的高度 34 | * */ 35 | int getAnimHeight(); 36 | 37 | int getCount(); 38 | 39 | void show(); 40 | 41 | void hide(); 42 | 43 | void setTabView(ITagSelectorTabView view); 44 | 45 | 46 | void setListAdapter(SelectorAdapter adapter); 47 | } 48 | -------------------------------------------------------------------------------- /tagselector/src/main/res/layout/item_tag_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 26 | 27 | -------------------------------------------------------------------------------- /Sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 |