├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── drawable │ │ │ └── background_card.9.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── tab_home_select.png │ │ │ ├── tab_more_select.png │ │ │ ├── tab_contact_select.png │ │ │ ├── tab_home_unselect.png │ │ │ ├── tab_more_unselect.png │ │ │ ├── tab_speech_select.png │ │ │ ├── tab_contact_unselect.png │ │ │ └── tab_speech_unselect.png │ │ └── layout │ │ │ ├── fr_simple_card.xml │ │ │ ├── activity_segment_tab.xml │ │ │ ├── activity_common_tab.xml │ │ │ └── activity_sliding_tab.xml │ │ ├── assets │ │ └── FredokaOne-Regular.ttf │ │ ├── java │ │ └── com │ │ │ └── flyco │ │ │ └── tablayoutsamples │ │ │ ├── entity │ │ │ └── TabEntity.java │ │ │ ├── ui │ │ │ ├── SimpleCardFragment.java │ │ │ ├── SimpleHomeActivity.java │ │ │ ├── SegmentTabActivity.java │ │ │ ├── SlidingTabActivity.java │ │ │ └── CommonTabActivity.java │ │ │ ├── utils │ │ │ └── ViewFindUtils.java │ │ │ └── adapter │ │ │ └── SimpleHomeAdapter.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── FlycoTabLayout_Lib ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── flyco │ │ │ └── tablayout │ │ │ ├── listener │ │ │ ├── OnTabSelectListener.java │ │ │ └── CustomTabEntity.java │ │ │ ├── utils │ │ │ ├── FragmentChangeManager.java │ │ │ └── UnreadMsgUtils.java │ │ │ ├── widget │ │ │ └── MsgView.java │ │ │ ├── SegmentTabLayout.java │ │ │ ├── CommonTabLayout.java │ │ │ └── SlidingTabLayout.java │ │ └── res │ │ ├── layout │ │ ├── _flyco_layout_tab.xml │ │ ├── _flyco_layout_tab_segment.xml │ │ ├── _flyco_layout_tab_left.xml │ │ ├── _flyco_layout_tab_top.xml │ │ ├── _flyco_layout_tab_bottom.xml │ │ └── _flyco_layout_tab_right.xml │ │ └── values │ │ └── attrs.xml ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── .gitignore ├── preview_1.gif ├── preview_2.gif ├── preview_3.gif ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── LICENSE ├── gradlew.bat ├── README_CN.md ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /FlycoTabLayout_Lib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':FlycoTabLayout_Lib' 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | build 4 | .idea 5 | *.iml 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /preview_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/preview_1.gif -------------------------------------------------------------------------------- /preview_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/preview_2.gif -------------------------------------------------------------------------------- /preview_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/preview_3.gif -------------------------------------------------------------------------------- /FlycoTabLayout_Lib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FlycoTabLayout 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/assets/FredokaOne-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/assets/FredokaOne-Regular.ttf -------------------------------------------------------------------------------- /app/src/main/res/drawable/background_card.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/drawable/background_card.9.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/tab_home_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/mipmap-xhdpi/tab_home_select.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/tab_more_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/mipmap-xhdpi/tab_more_select.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/tab_contact_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/mipmap-xhdpi/tab_contact_select.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/tab_home_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/mipmap-xhdpi/tab_home_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/tab_more_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/mipmap-xhdpi/tab_more_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/tab_speech_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/mipmap-xhdpi/tab_speech_select.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/tab_contact_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/mipmap-xhdpi/tab_contact_unselect.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/tab_speech_unselect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/FlycoTabLayout/HEAD/app/src/main/res/mipmap-xhdpi/tab_speech_unselect.png -------------------------------------------------------------------------------- /FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/listener/OnTabSelectListener.java: -------------------------------------------------------------------------------- 1 | package com.flyco.tablayout.listener; 2 | 3 | public interface OnTabSelectListener { 4 | void onTabSelect(int position); 5 | void onTabReselect(int position); 6 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Oct 10 13:13:42 CST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://downloads.gradle-dn.com/distributions/gradle-6.7.1-bin.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #8BC34A 4 | #689F38 5 | #FF4081 6 | #FFFFFF 7 | 8 | -------------------------------------------------------------------------------- /FlycoTabLayout_Lib/src/main/java/com/flyco/tablayout/listener/CustomTabEntity.java: -------------------------------------------------------------------------------- 1 | package com.flyco.tablayout.listener; 2 | 3 | import androidx.annotation.DrawableRes; 4 | 5 | public interface CustomTabEntity { 6 | String getTabTitle(); 7 | 8 | @DrawableRes 9 | int getTabSelectedIcon(); 10 | 11 | @DrawableRes 12 | int getTabUnselectedIcon(); 13 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/fr_simple_card.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 14 | 15 | -------------------------------------------------------------------------------- /FlycoTabLayout_Lib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 30 5 | defaultConfig { 6 | minSdkVersion 14 7 | targetSdkVersion 30 8 | versionCode 1 9 | versionName "1.0" 10 | } 11 | buildTypes { 12 | release { 13 | minifyEnabled false 14 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 15 | } 16 | } 17 | } 18 | 19 | dependencies { 20 | implementation fileTree(dir: 'libs', include: ['*.jar']) 21 | implementation 'androidx.appcompat:appcompat:1.3.0' 22 | implementation "androidx.viewpager2:viewpager2:1.0.0" 23 | } 24 | -------------------------------------------------------------------------------- /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 /Users/lihui/work/AndroidStudio/sdk/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 | -------------------------------------------------------------------------------- /FlycoTabLayout_Lib/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/lihui/work/AndroidStudio/sdk/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 | -------------------------------------------------------------------------------- /app/src/main/java/com/flyco/tablayoutsamples/entity/TabEntity.java: -------------------------------------------------------------------------------- 1 | package com.flyco.tablayoutsamples.entity; 2 | 3 | import com.flyco.tablayout.listener.CustomTabEntity; 4 | 5 | public class TabEntity implements CustomTabEntity { 6 | public String title; 7 | public int selectedIcon; 8 | public int unSelectedIcon; 9 | 10 | public TabEntity(String title, int selectedIcon, int unSelectedIcon) { 11 | this.title = title; 12 | this.selectedIcon = selectedIcon; 13 | this.unSelectedIcon = unSelectedIcon; 14 | } 15 | 16 | @Override 17 | public String getTabTitle() { 18 | return title; 19 | } 20 | 21 | @Override 22 | public int getTabSelectedIcon() { 23 | return selectedIcon; 24 | } 25 | 26 | @Override 27 | public int getTabUnselectedIcon() { 28 | return unSelectedIcon; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 16 | 17 |