From e1e503f9f47898f6c203b58148e3f52922e0d621 Mon Sep 17 00:00:00 2001
From: zhoulei <1090447721@qq.com>
Date: Thu, 13 May 2021 14:35:41 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E9=A1=B9=E7=9B=AE=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 11 +-
.idea/compiler.xml | 22 -
.idea/copyright/profiles_settings.xml | 3 -
.idea/gradle.xml | 20 -
.idea/misc.xml | 46 -
.idea/modules.xml | 10 -
.idea/runConfigurations.xml | 12 -
.idea/vcs.xml | 6 -
AdvancedPagerSlidingTabStrip.iml | 19 -
CHANGELOG.md | 8 +
ChangLog.md | 9 -
LICENSE | 201 +++
{app => Library}/.gitignore | 0
Library/AndroidManifest.xml | 7 -
Library/Library.iml | 99 --
Library/build.gradle | 39 +-
Library/proguard-rules.pro | 1 +
Library/res/drawable/apsts_tips.xml | 19 -
Library/res/drawable/psts_background_tab.xml | 8 -
Library/res/values/attrs.xml | 24 -
Library/res/values/colors.xml | 6 -
Library/res/values/dimens.xml | 11 -
Library/res/values/ids.xml | 5 -
.../library/AdvancedPagerSlidingTabStrip.java | 1091 ---------------
.../src/com/lhh/apst/library/ViewHolder.java | 25 -
Library/src/main/config.json | 27 +
.../library/AdvancedPagerSlidingTabStrip.java | 1193 +++++++++++++++++
.../library/CustomPagerSlidingTabStrip.java | 621 ++++-----
.../java}/com/lhh/apst/library/Margins.java | 28 +-
.../apst/library/utils/TypedAttrUtils.java | 196 +++
.../main/resources/base/element/color.json | 12 +
.../main/resources/base/element/float.json | 32 +
.../main/resources/base/element/string.json | 16 +
.../resources/base/graphic/apsts_tips.xml | 16 +
.../base/graphic/psts_background_tab.xml | 16 +
.../com/lhh/apst/library/ExampleTest.java | 9 +
Pic/Screen_20160216163404.png | Bin 30900 -> 0 bytes
Pic/Screen_20160216163428.png | Bin 29537 -> 0 bytes
Pic/Screen_20160216163452.png | Bin 28828 -> 0 bytes
Pic/Screen_20160411141706.png | Bin 31539 -> 0 bytes
Pic/categry_icon_n.png | Bin 1353 -> 0 bytes
Pic/categry_icon_p.png | Bin 1303 -> 0 bytes
Pic/classify_icon_n.png | Bin 1286 -> 0 bytes
Pic/classify_icon_p.png | Bin 1242 -> 0 bytes
Pic/mine_icon_n.png | Bin 2185 -> 0 bytes
Pic/mine_icon_p.png | Bin 1813 -> 0 bytes
Pic/update_dynamic_n.png | Bin 2569 -> 0 bytes
Pic/update_dynamic_p.png | Bin 2136 -> 0 bytes
README.md | 251 ++--
app/app.iml | 128 --
app/build.gradle | 35 -
app/proguard-rules.pro | 17 -
.../ApplicationTest.java | 13 -
app/src/main/AndroidManifest.xml | 47 -
.../APSTSViewPager.java | 30 -
.../advancedpagerslidingtabstrip/App.java | 22 -
.../CustomTabActivity.java | 178 ---
.../IconTabActivity.java | 183 ---
.../MainActivity.java | 71 -
.../NormalTabActivity.java | 160 ---
.../ViewTabActivity.java | 200 ---
.../WeiboTabActivity.java | 303 -----
.../com/lhh/apst/fragments/FirstFragment.java | 28 -
.../lhh/apst/fragments/FourthFragment.java | 28 -
.../lhh/apst/fragments/SecondFragment.java | 28 -
.../com/lhh/apst/fragments/ThirdFragment.java | 28 -
app/src/main/res/drawable/sub_background.xml | 15 -
app/src/main/res/drawable/tab_bg_normal.xml | 4 -
.../main/res/drawable/tab_bg_transparent.xml | 4 -
app/src/main/res/drawable/tab_bg_white.xml | 4 -
.../main/res/drawable/tab_color_select.xml | 8 -
.../main/res/drawable/weibo_tab_bg_normal.xml | 4 -
.../main/res/layout/activity_custom_tab.xml | 17 -
app/src/main/res/layout/activity_icon_tab.xml | 18 -
app/src/main/res/layout/activity_main.xml | 37 -
.../main/res/layout/activity_normal_tab.xml | 17 -
.../main/res/layout/activity_weibo_tab.xml | 32 -
.../main/res/layout/custom_disselect_tab.xml | 19 -
app/src/main/res/layout/custom_select_tab.xml | 20 -
app/src/main/res/layout/first_fragment.xml | 11 -
app/src/main/res/layout/fourth_fragment.xml | 11 -
app/src/main/res/layout/second_fragment.xml | 11 -
app/src/main/res/layout/third_fragment.xml | 11 -
app/src/main/res/menu/menu_main.xml | 6 -
app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3418 -> 0 bytes
app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 2206 -> 0 bytes
app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 4842 -> 0 bytes
.../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 7718 -> 0 bytes
app/src/main/res/values-w820dp/dimens.xml | 6 -
app/src/main/res/values/colors.xml | 9 -
app/src/main/res/values/dimens.xml | 9 -
app/src/main/res/values/strings.xml | 6 -
app/src/main/res/values/styles.xml | 58 -
build.gradle | 35 +-
entry/.gitignore | 1 +
entry/build.gradle | 31 +
entry/proguard-rules.pro | 1 +
entry/src/main/config.json | 99 ++
.../advancedpagerslidingtabstrip/App.java | 30 +
.../CustomTabAbility.java | 33 +
.../IconTabAbility.java | 33 +
.../MainAbility.java | 33 +
.../NormalTabAbility.java | 33 +
.../ViewTabAbility.java | 33 +
.../WeiboTabAbility.java | 33 +
.../fragments/BaseFragment.java | 52 +
.../fragments/FirstFragment.java | 40 +
.../fragments/FourthFragment.java | 40 +
.../fragments/SecondFragment.java | 40 +
.../fragments/ThirdFragment.java | 40 +
.../slice/CustomTabSlice.java | 197 +++
.../slice/IconTabSlice.java | 220 +++
.../slice/MainAbilitySlice.java | 105 ++
.../slice/NormalTabSlice.java | 177 +++
.../slice/ViewTabSlice.java | 265 ++++
.../slice/WeiboTabSlice.java | 352 +++++
.../main/resources/base/element/color.json | 24 +
.../main/resources/base/element/float.json | 24 +
.../main/resources/base/element/string.json | 12 +
.../base/graphic/background_ability_main.xml | 6 +
.../base/graphic/background_button.xml | 8 +
.../resources/base/graphic/sub_background.xml | 11 +
.../resources/base/graphic/sub_bg_normal.xml | 9 +
.../resources/base/graphic/sub_bg_pressed.xml | 10 +
.../resources/base/graphic/tab_bg_normal.xml | 7 +
.../base/graphic/tab_bg_transparent.xml | 7 +
.../resources/base/graphic/tab_bg_white.xml | 7 +
.../base/graphic/tab_color_select.xml | 24 +
.../main/resources/base/graphic/toast_bg.xml | 10 +
.../base/graphic/weibo_tab_bg_normal.xml | 7 +
.../base/layout/ability_custom_tab.xml | 27 +
.../base/layout/ability_icon_tab.xml | 31 +
.../resources/base/layout/ability_main.xml | 53 +
.../base/layout/ability_normal_tab.xml | 31 +
.../base/layout/ability_weibo_tab.xml | 46 +
.../base/layout/custom_disselect_tab.xml | 21 +
.../base/layout/custom_select_tab.xml | 20 +
.../resources/base/layout/first_fragment.xml | 15 +
.../resources/base/layout/fourth_fragment.xml | 16 +
.../resources/base/layout/layout_toast.xml | 22 +
.../resources/base/layout/second_fragment.xml | 16 +
.../resources/base/layout/third_fragment.xml | 16 +
.../base/media}/home_auther_icon_f_n.png | Bin
.../base/media}/home_auther_icon_f_p.png | Bin
.../base/media}/home_categry_icon_f_n.png | Bin
.../base/media}/home_categry_icon_n.png | Bin
.../base/media}/home_live_icon_f_n.png | Bin
.../base/media}/home_live_icon_n.png | Bin
.../base/media}/home_main_icon_f_n.png | Bin
.../base/media}/home_main_icon_n.png | Bin
.../base/media}/home_mine_icon_f_n.png | Bin
.../base/media}/home_mine_icon_n.png | Bin
entry/src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes
.../tabbar_compose_icon_add_highlighted.png | Bin
.../resources/base/media}/tabbar_discover.png | Bin
.../media}/tabbar_discover_highlighted.png | Bin
.../resources/base/media}/tabbar_home.png | Bin
.../base/media}/tabbar_home_highlighted.png | Bin
.../base/media}/tabbar_home_selected.png | Bin
.../base/media}/tabbar_message_center.png | Bin
.../tabbar_message_center_highlighted.png | Bin
.../resources/base/media}/tabbar_profile.png | Bin
.../media}/tabbar_profile_highlighted.png | Bin
entry/src/ohosTest/config.json | 41 +
.../ExampleOhosTest.java | 14 +
.../ExampleTest.java | 9 +
gradle.properties | 26 +-
gradle/wrapper/gradle-wrapper.jar | Bin 53636 -> 58694 bytes
gradle/wrapper/gradle-wrapper.properties | 3 +-
gradlew | 109 +-
gradlew.bat | 33 +-
img/page1.png | Bin 0 -> 46534 bytes
img/page2.png | Bin 0 -> 53173 bytes
img/page3.png | Bin 0 -> 48308 bytes
img/page4.png | Bin 0 -> 51560 bytes
img/page5.png | Bin 0 -> 54363 bytes
local.properties | 13 +
settings.gradle | 2 +-
178 files changed, 4799 insertions(+), 3809 deletions(-)
delete mode 100644 .idea/compiler.xml
delete mode 100644 .idea/copyright/profiles_settings.xml
delete mode 100644 .idea/gradle.xml
delete mode 100644 .idea/misc.xml
delete mode 100644 .idea/modules.xml
delete mode 100644 .idea/runConfigurations.xml
delete mode 100644 .idea/vcs.xml
delete mode 100644 AdvancedPagerSlidingTabStrip.iml
create mode 100644 CHANGELOG.md
delete mode 100644 ChangLog.md
create mode 100644 LICENSE
rename {app => Library}/.gitignore (100%)
delete mode 100644 Library/AndroidManifest.xml
delete mode 100644 Library/Library.iml
create mode 100644 Library/proguard-rules.pro
delete mode 100644 Library/res/drawable/apsts_tips.xml
delete mode 100644 Library/res/drawable/psts_background_tab.xml
delete mode 100644 Library/res/values/attrs.xml
delete mode 100644 Library/res/values/colors.xml
delete mode 100644 Library/res/values/dimens.xml
delete mode 100644 Library/res/values/ids.xml
delete mode 100644 Library/src/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java
delete mode 100644 Library/src/com/lhh/apst/library/ViewHolder.java
create mode 100644 Library/src/main/config.json
create mode 100644 Library/src/main/java/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java
rename Library/src/{ => main/java}/com/lhh/apst/library/CustomPagerSlidingTabStrip.java (36%)
rename Library/src/{ => main/java}/com/lhh/apst/library/Margins.java (40%)
create mode 100644 Library/src/main/java/com/lhh/apst/library/utils/TypedAttrUtils.java
create mode 100644 Library/src/main/resources/base/element/color.json
create mode 100644 Library/src/main/resources/base/element/float.json
create mode 100644 Library/src/main/resources/base/element/string.json
create mode 100644 Library/src/main/resources/base/graphic/apsts_tips.xml
create mode 100644 Library/src/main/resources/base/graphic/psts_background_tab.xml
create mode 100644 Library/src/test/java/com/lhh/apst/library/ExampleTest.java
delete mode 100644 Pic/Screen_20160216163404.png
delete mode 100644 Pic/Screen_20160216163428.png
delete mode 100644 Pic/Screen_20160216163452.png
delete mode 100644 Pic/Screen_20160411141706.png
delete mode 100755 Pic/categry_icon_n.png
delete mode 100755 Pic/categry_icon_p.png
delete mode 100755 Pic/classify_icon_n.png
delete mode 100755 Pic/classify_icon_p.png
delete mode 100755 Pic/mine_icon_n.png
delete mode 100755 Pic/mine_icon_p.png
delete mode 100755 Pic/update_dynamic_n.png
delete mode 100755 Pic/update_dynamic_p.png
delete mode 100644 app/app.iml
delete mode 100644 app/build.gradle
delete mode 100644 app/proguard-rules.pro
delete mode 100644 app/src/androidTest/java/com/lhh/apst/advancedpagerslidingtabstrip/ApplicationTest.java
delete mode 100644 app/src/main/AndroidManifest.xml
delete mode 100644 app/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/APSTSViewPager.java
delete mode 100644 app/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/App.java
delete mode 100644 app/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/CustomTabActivity.java
delete mode 100644 app/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/IconTabActivity.java
delete mode 100644 app/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/MainActivity.java
delete mode 100644 app/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/NormalTabActivity.java
delete mode 100644 app/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/ViewTabActivity.java
delete mode 100644 app/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/WeiboTabActivity.java
delete mode 100644 app/src/main/java/com/lhh/apst/fragments/FirstFragment.java
delete mode 100644 app/src/main/java/com/lhh/apst/fragments/FourthFragment.java
delete mode 100644 app/src/main/java/com/lhh/apst/fragments/SecondFragment.java
delete mode 100644 app/src/main/java/com/lhh/apst/fragments/ThirdFragment.java
delete mode 100644 app/src/main/res/drawable/sub_background.xml
delete mode 100644 app/src/main/res/drawable/tab_bg_normal.xml
delete mode 100644 app/src/main/res/drawable/tab_bg_transparent.xml
delete mode 100644 app/src/main/res/drawable/tab_bg_white.xml
delete mode 100644 app/src/main/res/drawable/tab_color_select.xml
delete mode 100644 app/src/main/res/drawable/weibo_tab_bg_normal.xml
delete mode 100644 app/src/main/res/layout/activity_custom_tab.xml
delete mode 100644 app/src/main/res/layout/activity_icon_tab.xml
delete mode 100644 app/src/main/res/layout/activity_main.xml
delete mode 100644 app/src/main/res/layout/activity_normal_tab.xml
delete mode 100644 app/src/main/res/layout/activity_weibo_tab.xml
delete mode 100644 app/src/main/res/layout/custom_disselect_tab.xml
delete mode 100644 app/src/main/res/layout/custom_select_tab.xml
delete mode 100644 app/src/main/res/layout/first_fragment.xml
delete mode 100644 app/src/main/res/layout/fourth_fragment.xml
delete mode 100644 app/src/main/res/layout/second_fragment.xml
delete mode 100644 app/src/main/res/layout/third_fragment.xml
delete mode 100644 app/src/main/res/menu/menu_main.xml
delete mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.png
delete mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.png
delete mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.png
delete mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.png
delete mode 100644 app/src/main/res/values-w820dp/dimens.xml
delete mode 100644 app/src/main/res/values/colors.xml
delete mode 100644 app/src/main/res/values/dimens.xml
delete mode 100644 app/src/main/res/values/strings.xml
delete mode 100644 app/src/main/res/values/styles.xml
create mode 100644 entry/.gitignore
create mode 100644 entry/build.gradle
create mode 100644 entry/proguard-rules.pro
create mode 100644 entry/src/main/config.json
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/App.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/CustomTabAbility.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/IconTabAbility.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/MainAbility.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/NormalTabAbility.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/ViewTabAbility.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/WeiboTabAbility.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/fragments/BaseFragment.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/fragments/FirstFragment.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/fragments/FourthFragment.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/fragments/SecondFragment.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/fragments/ThirdFragment.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/slice/CustomTabSlice.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/slice/IconTabSlice.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/slice/MainAbilitySlice.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/slice/NormalTabSlice.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/slice/ViewTabSlice.java
create mode 100644 entry/src/main/java/com/lhh/apst/advancedpagerslidingtabstrip/slice/WeiboTabSlice.java
create mode 100644 entry/src/main/resources/base/element/color.json
create mode 100644 entry/src/main/resources/base/element/float.json
create mode 100644 entry/src/main/resources/base/element/string.json
create mode 100644 entry/src/main/resources/base/graphic/background_ability_main.xml
create mode 100644 entry/src/main/resources/base/graphic/background_button.xml
create mode 100644 entry/src/main/resources/base/graphic/sub_background.xml
create mode 100644 entry/src/main/resources/base/graphic/sub_bg_normal.xml
create mode 100644 entry/src/main/resources/base/graphic/sub_bg_pressed.xml
create mode 100644 entry/src/main/resources/base/graphic/tab_bg_normal.xml
create mode 100644 entry/src/main/resources/base/graphic/tab_bg_transparent.xml
create mode 100644 entry/src/main/resources/base/graphic/tab_bg_white.xml
create mode 100644 entry/src/main/resources/base/graphic/tab_color_select.xml
create mode 100644 entry/src/main/resources/base/graphic/toast_bg.xml
create mode 100644 entry/src/main/resources/base/graphic/weibo_tab_bg_normal.xml
create mode 100644 entry/src/main/resources/base/layout/ability_custom_tab.xml
create mode 100644 entry/src/main/resources/base/layout/ability_icon_tab.xml
create mode 100644 entry/src/main/resources/base/layout/ability_main.xml
create mode 100644 entry/src/main/resources/base/layout/ability_normal_tab.xml
create mode 100644 entry/src/main/resources/base/layout/ability_weibo_tab.xml
create mode 100644 entry/src/main/resources/base/layout/custom_disselect_tab.xml
create mode 100644 entry/src/main/resources/base/layout/custom_select_tab.xml
create mode 100644 entry/src/main/resources/base/layout/first_fragment.xml
create mode 100644 entry/src/main/resources/base/layout/fourth_fragment.xml
create mode 100644 entry/src/main/resources/base/layout/layout_toast.xml
create mode 100644 entry/src/main/resources/base/layout/second_fragment.xml
create mode 100644 entry/src/main/resources/base/layout/third_fragment.xml
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_auther_icon_f_n.png (100%)
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_auther_icon_f_p.png (100%)
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_categry_icon_f_n.png (100%)
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_categry_icon_n.png (100%)
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_live_icon_f_n.png (100%)
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_live_icon_n.png (100%)
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_main_icon_f_n.png (100%)
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_main_icon_n.png (100%)
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_mine_icon_f_n.png (100%)
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/home_mine_icon_n.png (100%)
create mode 100644 entry/src/main/resources/base/media/icon.png
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_compose_icon_add_highlighted.png (100%)
mode change 100755 => 100644
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_discover.png (100%)
mode change 100755 => 100644
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_discover_highlighted.png (100%)
mode change 100755 => 100644
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_home.png (100%)
mode change 100755 => 100644
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_home_highlighted.png (100%)
mode change 100755 => 100644
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_home_selected.png (100%)
mode change 100755 => 100644
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_message_center.png (100%)
mode change 100755 => 100644
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_message_center_highlighted.png (100%)
mode change 100755 => 100644
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_profile.png (100%)
mode change 100755 => 100644
rename {app/src/main/res/mipmap-xhdpi => entry/src/main/resources/base/media}/tabbar_profile_highlighted.png (100%)
mode change 100755 => 100644
create mode 100644 entry/src/ohosTest/config.json
create mode 100644 entry/src/ohosTest/java/com/lhh/apst/advancedpagerslidingtabstrip/ExampleOhosTest.java
create mode 100644 entry/src/test/java/com/lhh/apst/advancedpagerslidingtabstrip/ExampleTest.java
create mode 100644 img/page1.png
create mode 100644 img/page2.png
create mode 100644 img/page3.png
create mode 100644 img/page4.png
create mode 100644 img/page5.png
create mode 100644 local.properties
diff --git a/.gitignore b/.gitignore
index afbdab3..37a4eb8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,15 @@
+*.iml
.gradle
/local.properties
-/.idea/workspace.xml
+/.idea/caches
/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
.DS_Store
/build
+/captures
+.externalNativeBuild
+/entry/.preview
+.cxx
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index 96cc43e..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
deleted file mode 100644
index b02ee6e..0000000
--- a/.idea/gradle.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index fbb6828..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 8905d9e..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460..0000000
--- a/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/AdvancedPagerSlidingTabStrip.iml b/AdvancedPagerSlidingTabStrip.iml
deleted file mode 100644
index 668b6fb..0000000
--- a/AdvancedPagerSlidingTabStrip.iml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..245e84a
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,8 @@
+## 0.0.1-SNAPSHOT
+* refactor: For module library Android-to-OpenHarmony
+
+## 1.4.0
+* 添加新的provider以及tab等新的设置。
+
+## 1.3.0
+* 修改参数属性,将tab标签换为apTab开头标签,避免与support包冲突。
\ No newline at end of file
diff --git a/ChangLog.md b/ChangLog.md
deleted file mode 100644
index 4b3da4a..0000000
--- a/ChangLog.md
+++ /dev/null
@@ -1,9 +0,0 @@
-##更新日志
-
-v1.4.0
-
-添加新的provider以及tab等新的设置。
-
-v1.3.0
-
-修改参数属性,将tab标签换为apTab开头标签,避免与support包冲突。
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/app/.gitignore b/Library/.gitignore
similarity index 100%
rename from app/.gitignore
rename to Library/.gitignore
diff --git a/Library/AndroidManifest.xml b/Library/AndroidManifest.xml
deleted file mode 100644
index 4824669..0000000
--- a/Library/AndroidManifest.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Library/Library.iml b/Library/Library.iml
deleted file mode 100644
index ea7bea3..0000000
--- a/Library/Library.iml
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- generateDebugSources
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Library/build.gradle b/Library/build.gradle
index 4e22795..da08760 100644
--- a/Library/build.gradle
+++ b/Library/build.gradle
@@ -1,27 +1,22 @@
-apply plugin: 'com.android.library'
-
-dependencies {
- compile 'com.android.support:appcompat-v7:23.1.0'
-}
-
-android {
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = ['src']
- resources.srcDirs = ['src']
- aidl.srcDirs = ['src']
- renderscript.srcDirs = ['src']
- res.srcDirs = ['res']
- assets.srcDirs = ['assets']
- }
- }
+apply plugin: 'com.huawei.ohos.library'
+ohos {
+ compileSdkVersion 5
defaultConfig {
- minSdkVersion 9
- compileSdkVersion 23
- buildToolsVersion "23.0.1"
+ compatibleSdkVersion 4
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
}
+
}
-apply from: 'https://raw.githubusercontent.com/HomHomLin/Gradle-Publish/master/bintray.gradle'
\ No newline at end of file
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ testImplementation 'junit:junit:4.13'
+}
diff --git a/Library/proguard-rules.pro b/Library/proguard-rules.pro
new file mode 100644
index 0000000..f7666e4
--- /dev/null
+++ b/Library/proguard-rules.pro
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git a/Library/res/drawable/apsts_tips.xml b/Library/res/drawable/apsts_tips.xml
deleted file mode 100644
index e0439d4..0000000
--- a/Library/res/drawable/apsts_tips.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Library/res/drawable/psts_background_tab.xml b/Library/res/drawable/psts_background_tab.xml
deleted file mode 100644
index 885cf03..0000000
--- a/Library/res/drawable/psts_background_tab.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Library/res/values/attrs.xml b/Library/res/values/attrs.xml
deleted file mode 100644
index 936c28b..0000000
--- a/Library/res/values/attrs.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Library/res/values/colors.xml b/Library/res/values/colors.xml
deleted file mode 100644
index 2dea27c..0000000
--- a/Library/res/values/colors.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- #6633B5E5
- #E43F3E
-
\ No newline at end of file
diff --git a/Library/res/values/dimens.xml b/Library/res/values/dimens.xml
deleted file mode 100644
index 99a8db4..0000000
--- a/Library/res/values/dimens.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- 10dp
- 4dp
- 9dp
- 8dp
- 7dp
- 23dp
- 10sp
-
\ No newline at end of file
diff --git a/Library/res/values/ids.xml b/Library/res/values/ids.xml
deleted file mode 100644
index 56a4372..0000000
--- a/Library/res/values/ids.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
- - 888
-
\ No newline at end of file
diff --git a/Library/src/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java b/Library/src/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java
deleted file mode 100644
index 105db22..0000000
--- a/Library/src/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java
+++ /dev/null
@@ -1,1091 +0,0 @@
-package com.lhh.apst.library;
-
-import android.annotation.SuppressLint;
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.Paint.Style;
-import android.graphics.Rect;
-import android.graphics.Typeface;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.Drawable;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.support.v4.content.res.ResourcesCompat;
-import android.support.v4.view.ViewPager;
-import android.util.AttributeSet;
-import android.util.DisplayMetrics;
-import android.util.SparseArray;
-import android.util.TypedValue;
-import android.view.Gravity;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewTreeObserver.OnGlobalLayoutListener;
-import android.widget.HorizontalScrollView;
-import android.widget.LinearLayout;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import java.util.Locale;
-
-/**
- * Created by linhomhom on 2015/8/10.
- */
-public class AdvancedPagerSlidingTabStrip extends HorizontalScrollView {
-
- public interface LayoutProvider {
- public float getPageWeight(int position);
- public int[] getPageRule(int position);
- public Margins getPageMargins(int position);
- }
-
- public interface TipsProvider {
- public int[] getTipsRule(int position);
- public Margins getTipsMargins(int position);
- public Drawable getTipsDrawable(int position);
- }
-
- public interface IconTabProvider {
- public T getPageIcon(int position);
- public T getPageSelectIcon(int position);
- public Rect getPageIconBounds(int position);
- }
-
- public interface ViewTabProvider{
-// public View onCreateIconView(int position, View view, ViewGroup parent);
- public View onSelectIconView(int position, View view, ViewGroup parent);
- public View onIconView(int position, View view, ViewGroup parent);
- }
-
- // @formatter:off
- private static final int[] ATTRS = new int[]{
- android.R.attr.textSize,
- android.R.attr.textColor
- };
- // @formatter:on
- private LinearLayout.LayoutParams expandedTabLayoutParams;
-
- private final PageListener pageListener = new PageListener();
- public ViewPager.OnPageChangeListener delegatePageListener;
-
- private LinearLayout tabsContainer;
- private ViewPager pager;
-
- private int tabCount;
-
- private int currentPosition = 0;
- private float currentPositionOffset = 0f;
-
- private Paint rectPaint;
- private Paint dividerPaint;
-
- private boolean checkedTabWidths = false;
-
- private int indicatorColor = 0xFF666666;
- private int underlineColor = 0x1A000000;
- private int dividerColor = 0x1A000000;
-
- private boolean shouldExpand = true;
- private boolean textAllCaps = true;
-
- private int scrollOffset = 52;
- private int indicatorHeight = 3;
- private int underlineHeight = 2;
- private int dividerPadding = 12;
- private int tabPadding = 24;
- private int tabPaddingTopBottom = 0;
- private int dividerWidth = 1;
-
- private int tabTextSize = 15;
- private int tabTextColor = 0xFF666666;
- private int tabTextSelectColor = 0xFF666666;
- private Typeface tabTypeface = null;
- private int tabTypefaceStyle = Typeface.NORMAL;
- private int tabDrawMode = DRAW_MODE_NORMAL;
-
- public static final int DRAW_MODE_NORMAL = 0;
- public static final int DRAW_MODE_TEXT = 1;
-
- private int lastScrollX = 0;
-
- private int tabBackgroundResId = R.drawable.psts_background_tab;
-// private int tabBackgroundResId;
-
- private Locale locale;
- private OnTabClickListener mOnTabClickListener;
- public interface OnTabClickListener{
- public void onClick(int pos);
- }
-
- public AdvancedPagerSlidingTabStrip(Context context) {
- this(context, null);
- }
-
- public AdvancedPagerSlidingTabStrip(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public AdvancedPagerSlidingTabStrip(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
-
- setFillViewport(true);
- setWillNotDraw(false);
-
- tabsContainer = new LinearLayout(context);
- tabsContainer.setOrientation(LinearLayout.HORIZONTAL);
- tabsContainer.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
- addView(tabsContainer);
-
- DisplayMetrics dm = getResources().getDisplayMetrics();
-
- scrollOffset = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, scrollOffset, dm);
- indicatorHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, indicatorHeight, dm);
- underlineHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, underlineHeight, dm);
- dividerPadding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dividerPadding, dm);
- tabPadding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, tabPadding, dm);
- dividerWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dividerWidth, dm);
- tabTextSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, tabTextSize, dm);
-
- // get system attrs (android:textSize and android:textColor)
-
- TypedArray a = context.obtainStyledAttributes(attrs, ATTRS);
-
- tabTextSize = a.getDimensionPixelSize(0, tabTextSize);
- tabTextColor = a.getColor(1, tabTextColor);
-
- a.recycle();
-
- // get custom attrs
-
-
- a = context.obtainStyledAttributes(attrs, R.styleable.AdvancedPagerSlidingTabStrip);
-
- indicatorColor = a.getColor(R.styleable.AdvancedPagerSlidingTabStrip_apTabIndicatorColor, indicatorColor);
- underlineColor = a.getColor(R.styleable.AdvancedPagerSlidingTabStrip_apTabUnderlineColor, underlineColor);
- dividerColor = a.getColor(R.styleable.AdvancedPagerSlidingTabStrip_apTabDividerColor, dividerColor);
- indicatorHeight = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabIndicatorHeight, indicatorHeight);
- underlineHeight = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabUnderlineHeight, underlineHeight);
- dividerPadding = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabDividerPadding, dividerPadding);
- tabPadding = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabPaddingLeftRight, tabPadding);
- tabPaddingTopBottom = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabPaddingTopBottom, tabPaddingTopBottom);
- tabBackgroundResId = a.getResourceId(R.styleable.AdvancedPagerSlidingTabStrip_apTabBackground, tabBackgroundResId);
- shouldExpand = a.getBoolean(R.styleable.AdvancedPagerSlidingTabStrip_apTabShouldExpand, shouldExpand);
- scrollOffset = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabScrollOffset, scrollOffset);
- textAllCaps = a.getBoolean(R.styleable.AdvancedPagerSlidingTabStrip_apTabTextAllCaps, textAllCaps);
- tabTextSelectColor = a.getColor(R.styleable.AdvancedPagerSlidingTabStrip_apTabTextSelectColor, dividerColor);
- tabDrawMode = a.getInteger(R.styleable.AdvancedPagerSlidingTabStrip_apTabDrawMode,DRAW_MODE_NORMAL);
-
- a.recycle();
-
- rectPaint = new Paint();
- rectPaint.setAntiAlias(true);
- rectPaint.setStyle(Style.FILL);
-
- dividerPaint = new Paint();
- dividerPaint.setAntiAlias(true);
- dividerPaint.setStrokeWidth(dividerWidth);
-
-// defaultTabLayoutParams = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT);
- expandedTabLayoutParams = new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1.0f);
-
- if (locale == null) {
- locale = getResources().getConfiguration().locale;
- }
-
- if(mViewTabCache == null){
- mViewTabCache = new SparseArray<>();
- }
- }
-
- public void setOnTabClickListener(OnTabClickListener onTabClickListener){
- mOnTabClickListener = onTabClickListener;
- }
-
- public void setViewPager(ViewPager pager) {
- this.pager = pager;
-
- if (pager.getAdapter() == null) {
- throw new IllegalStateException("ViewPager does not have adapter instance.");
- }
-
- pager.addOnPageChangeListener(pageListener);
-
- notifyDataSetChanged();
- }
-
- public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
- this.delegatePageListener = listener;
- }
-
- public void notifyDataSetChanged() {
-
- tabsContainer.removeAllViews();
-
- tabCount = pager.getAdapter().getCount();
-
- for (int i = 0; i < tabCount; i++) {
-
- if (pager.getAdapter() instanceof IconTabProvider) {
- addIconTab(i, ((IconTabProvider) pager.getAdapter()).getPageIcon(i), pager.getAdapter().getPageTitle(i).toString());
- } else if(pager.getAdapter() instanceof ViewTabProvider){
- addViewTab(i, ((ViewTabProvider) pager.getAdapter()),pager.getAdapter().getPageTitle(i).toString());
- } else {
-// addIconTab(i, R.drawable.home_categry_icon_n, pager.getAdapter().getPageTitle(i).toString());
-
- addTextTab(i, pager.getAdapter().getPageTitle(i).toString());
- }
-
- }
-
- updateTabStyles();
-
- checkedTabWidths = false;
-
- getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
-
- @SuppressWarnings("deprecation")
- @SuppressLint("NewApi")
- @Override
- public void onGlobalLayout() {
-
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
- getViewTreeObserver().removeGlobalOnLayoutListener(this);
- } else {
- getViewTreeObserver().removeOnGlobalLayoutListener(this);
- }
-
- currentPosition = pager.getCurrentItem();
- scrollToChild(currentPosition, 0);
- }
- });
-
- pageListener.onPageSelected(0);//default
-
- }
-
- private void addTextTab(final int position, String title) {
-
- RelativeLayout tab = new RelativeLayout(getContext());
- tab.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- if(mOnTabClickListener != null){
- mOnTabClickListener.onClick(position);
- }
- scrollToChild(position, 0);
- pager.setCurrentItem(position);
- }
- });
-
- TextView txt = new TextView(getContext());
- txt.setText(title);
- txt.setFocusable(true);
- txt.setGravity(Gravity.CENTER);
- txt.setSingleLine();
- txt.setId(R.id.id_tab_txt);
- RelativeLayout.LayoutParams txtParams = new RelativeLayout.LayoutParams(
- RelativeLayout.LayoutParams.WRAP_CONTENT,
- RelativeLayout.LayoutParams.WRAP_CONTENT);
- txtParams.addRule(RelativeLayout.CENTER_IN_PARENT);
- if(pager.getAdapter() instanceof LayoutProvider){
- LayoutProvider layoutProvider = (LayoutProvider)pager.getAdapter();
- for(Integer rule : layoutProvider.getPageRule(position)){
- txtParams.addRule(rule);
- }
- Margins margins = layoutProvider.getPageMargins(position);
- if(margins != null) {
- txtParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
- }
- }
-// txtParams.addRule(RelativeLayout.CENTER_IN_PARENT);
- txt.setLayoutParams(txtParams);
-
- RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(getResources().getDimensionPixelSize(R.dimen.psts_dot_wh), getResources().getDimensionPixelSize(R.dimen.psts_dot_wh));
- TextView dot = new TextView(getContext());
- dot.setTextColor(Color.WHITE);
- dot.setBackgroundColor(Color.BLUE);
- dot.setGravity(Gravity.CENTER);
- dot.setSingleLine();
- dot.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.psts_dot_txt_size));
- //16 new
- Drawable dot_drawable = ResourcesCompat.getDrawable(getResources(), R.drawable.apsts_tips, null);
-
-
- boolean hasRule = false;
- layoutParams.setMargins(0, 0, getResources().getDimensionPixelSize(R.dimen.psts_dot_m_right), 0);
- if(pager.getAdapter() instanceof TipsProvider){
- TipsProvider tipsProvider = (TipsProvider)pager.getAdapter();
- for(Integer rule : tipsProvider.getTipsRule(position)){
- layoutParams.addRule(rule);
- hasRule = true;
- }
- Margins margins = tipsProvider.getTipsMargins(position);
- if(margins != null) {
- layoutParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
- }
- Drawable drawable = tipsProvider.getTipsDrawable(position);
- if(drawable != null){
- dot_drawable = drawable;
-
- }
- }
-
- if(!hasRule){
-// layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
- layoutParams.addRule(RelativeLayout.ALIGN_RIGHT, R.id.id_tab_txt);
- layoutParams.addRule(RelativeLayout.ALIGN_TOP, R.id.id_tab_txt);
- int halfSize = getResources().getDimensionPixelSize(R.dimen.psts_dot_m_tv_right);
- layoutParams.setMargins(0, 0, -halfSize, 0);
- }
-
- if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- dot.setBackground(dot_drawable);
- }else{
- dot.setBackgroundDrawable(dot_drawable);
- }
- dot.setLayoutParams(layoutParams);
-
- tab.addView(txt);
- tab.addView(dot);
- dot.setVisibility(View.GONE);
- tabsContainer.addView(tab);
-
- }
-
- public void showDot(int index) {
- RelativeLayout tab = (RelativeLayout) tabsContainer.getChildAt(index);
- TextView dot_layout = (TextView) tab.getChildAt(tab.getChildCount() - 1);
- dot_layout.setText("");
- RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams)dot_layout.getLayoutParams();
- layoutParams.width = getResources().getDimensionPixelSize(R.dimen.psts_dot_wh);
- layoutParams.height = getResources().getDimensionPixelSize(R.dimen.psts_dot_wh);
-
- dot_layout.setVisibility(View.VISIBLE);
- }
-
- public void showDot(int index,String dotTxt) {
- RelativeLayout tab = (RelativeLayout) tabsContainer.getChildAt(index);
- TextView dot_layout = (TextView) tab.getChildAt(tab.getChildCount() - 1);
- RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams)dot_layout.getLayoutParams();
- layoutParams.width = RelativeLayout.LayoutParams.WRAP_CONTENT;
- layoutParams.height = RelativeLayout.LayoutParams.WRAP_CONTENT;
- dot_layout.setText(dotTxt);
- dot_layout.setVisibility(View.VISIBLE);
- }
-
- public void hideDot(int index) {
- RelativeLayout tab = (RelativeLayout) tabsContainer.getChildAt(index);
- TextView dot_layout = (TextView) tab.getChildAt(tab.getChildCount() - 1);
- dot_layout.setVisibility(View.GONE);
- }
-
- private SparseArray mViewTabCache;//缓存
-
- private View getTabView(int position){
- return mViewTabCache.get(position);
- }
-
- private void setTabView( int position ,View view){
- mViewTabCache.put(position, view);
- }
-
- private void addViewTab(final int position, ViewTabProvider provider, String title) {
-
- RelativeLayout tab = new RelativeLayout(getContext());
- tab.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- if(mOnTabClickListener != null){
- mOnTabClickListener.onClick(position);
- }
- scrollToChild(position, 0);
- pager.setCurrentItem(position);
- }
- });
-
- //文本和图
- TextView txt = new TextView(getContext());
- txt.setText(title);
- txt.setFocusable(true);
- txt.setGravity(Gravity.CENTER);
- txt.setSingleLine();
- txt.setId(R.id.id_tab_txt);
- RelativeLayout.LayoutParams txtParams = new RelativeLayout.LayoutParams(
- RelativeLayout.LayoutParams.WRAP_CONTENT,
- RelativeLayout.LayoutParams.WRAP_CONTENT);
- txtParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
- txtParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
- if(pager.getAdapter() instanceof LayoutProvider){
- LayoutProvider layoutProvider = (LayoutProvider)pager.getAdapter();
- for(Integer rule : layoutProvider.getPageRule(position)){
- txtParams.addRule(rule);
- }
- Margins margins = layoutProvider.getPageMargins(position);
- if(margins != null) {
- txtParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
- }
- }
- txtParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
- txtParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
- txt.setLayoutParams(txtParams);
-
- //使用缓存
- View view = provider.onIconView(position, getTabView(position), tab);
- setTabView(position, view);//保存view到缓存中
- RelativeLayout.LayoutParams viewLayoutParams
- = (RelativeLayout.LayoutParams)view.getLayoutParams();
- viewLayoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
- viewLayoutParams.addRule(RelativeLayout.ABOVE, R.id.id_tab_txt);
-
-
- RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(getResources().getDimensionPixelSize(R.dimen.psts_dot_wh), getResources().getDimensionPixelSize(R.dimen.psts_dot_wh));
- TextView dot = new TextView(getContext());
- dot.setTextColor(Color.WHITE);
- dot.setBackgroundColor(Color.BLUE);
- dot.setGravity(Gravity.CENTER);
- dot.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.psts_dot_txt_size));
- dot.setSingleLine();
-
- Drawable dot_drawable = ResourcesCompat.getDrawable(getResources(), R.drawable.apsts_tips, null);
-
- boolean hasRule = false;
- layoutParams.setMargins(0, 0, getResources().getDimensionPixelSize(R.dimen.psts_dot_m_right), 0);
- if(pager.getAdapter() instanceof TipsProvider){
- TipsProvider tipsProvider = (TipsProvider)pager.getAdapter();
- for(Integer rule : tipsProvider.getTipsRule(position)){
- layoutParams.addRule(rule);
- hasRule = true;
- }
- Margins margins = tipsProvider.getTipsMargins(position);
- if(margins != null) {
- layoutParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
- }
- Drawable drawable = tipsProvider.getTipsDrawable(position);
- if(drawable != null){
- dot_drawable = drawable;
-
- }
- }
-
- if(!hasRule){
- layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
- }
- if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- dot.setBackground(dot_drawable);
- }else{
- dot.setBackgroundDrawable(dot_drawable);
- }
- dot.setLayoutParams(layoutParams);
-
- tab.addView(txt);
- tab.addView(view);
- tab.addView(dot);
- dot.setVisibility(View.GONE);
- tabsContainer.addView(tab);
-
- }
-
- private void addIconTab(final int position, Object res, String text) {
-
- RelativeLayout tab = new RelativeLayout(getContext());
- tab.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- if(mOnTabClickListener != null){
- mOnTabClickListener.onClick(position);
- }
- scrollToChild(position, 0);
- pager.setCurrentItem(position);
- }
- });
-
- //文本和图
- TextView txt = new TextView(getContext());
- txt.setText(text);
- txt.setFocusable(true);
- txt.setGravity(Gravity.CENTER);
- txt.setSingleLine();
- txt.setId(R.id.id_tab_txt);
- RelativeLayout.LayoutParams txtParams = new RelativeLayout.LayoutParams(
- RelativeLayout.LayoutParams.WRAP_CONTENT,
- RelativeLayout.LayoutParams.WRAP_CONTENT);
- txtParams.addRule(RelativeLayout.CENTER_IN_PARENT);
- if(pager.getAdapter() instanceof LayoutProvider){
- LayoutProvider layoutProvider = (LayoutProvider)pager.getAdapter();
- for(Integer rule : layoutProvider.getPageRule(position)){
- txtParams.addRule(rule);
-
- }
- Margins margins = layoutProvider.getPageMargins(position);
- if(margins != null) {
- txtParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
- }
- }
-// txtParams.addRule(RelativeLayout.CENTER_IN_PARENT);
- txt.setLayoutParams(txtParams);
-
- setViewResource(position,res, txt);
-
- RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(getResources().getDimensionPixelSize(R.dimen.psts_dot_wh), getResources().getDimensionPixelSize(R.dimen.psts_dot_wh));
- TextView dot = new TextView(getContext());
- dot.setTextColor(Color.WHITE);
- dot.setBackgroundColor(Color.BLUE);
- dot.setGravity(Gravity.CENTER);
- dot.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.psts_dot_txt_size));
- dot.setSingleLine();
- Drawable dot_drawable = ResourcesCompat.getDrawable(getResources(), R.drawable.apsts_tips, null);
-
- boolean hasRule = false;
- layoutParams.setMargins(0, 0, getResources().getDimensionPixelSize(R.dimen.psts_dot_m_right), 0);
- if(pager.getAdapter() instanceof TipsProvider){
- TipsProvider tipsProvider = (TipsProvider)pager.getAdapter();
- for(Integer rule : tipsProvider.getTipsRule(position)){
- layoutParams.addRule(rule);
- hasRule = true;
- }
- Margins margins = tipsProvider.getTipsMargins(position);
- if(margins != null) {
- layoutParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
- }
- Drawable drawable = tipsProvider.getTipsDrawable(position);
- if(drawable != null){
- dot_drawable = drawable;
-
- }
- }
-
- if(!hasRule){
- layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
- }
-
- if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- dot.setBackground(dot_drawable);
- }else{
- dot.setBackgroundDrawable(dot_drawable);
- }
- dot.setLayoutParams(layoutParams);
-
- tab.addView(txt);
- tab.addView(dot);
- dot.setVisibility(View.GONE);
- tabsContainer.addView(tab);
-
- }
-
- public View getTabAt(int pos) {
- if (pos >= tabsContainer.getChildCount()) {
- throw new IllegalStateException("pos is too big.");
- }
- return tabsContainer.getChildAt(pos);
- }
-
- private void updateTabStyles() {
-
- for (int i = 0; i < tabCount; i++) {
-
- View v = tabsContainer.getChildAt(i);
-
- //v.setLayoutParams(defaultTabLayoutParams);
- //my modify
- v.setLayoutParams(expandedTabLayoutParams);
- v.setBackgroundResource(tabBackgroundResId);
- if (shouldExpand) {
- v.setPadding(0, 0, 0, 0);
- } else {
- v.setPadding(tabPadding, tabPaddingTopBottom, tabPadding, tabPaddingTopBottom);
- }
-
- if (v instanceof RelativeLayout) {
-
- RelativeLayout tab = (RelativeLayout) v;
- TextView tv = (TextView)tab.getChildAt(0);
- tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, tabTextSize);
- tv.setTypeface(tabTypeface, tabTypefaceStyle);
- tv.setTextColor(tabTextColor);
-
- // setAllCaps() is only available from API 14, so the upper case is made manually if we are on a
- // pre-ICS-build
- if (textAllCaps) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
- tv.setAllCaps(true);
- } else {
- tv.setText(tv.getText().toString().toUpperCase(locale));
- }
- }
- }
- }
-
- }
-
- public boolean setTabLayoutParams(){
- if(pager.getAdapter() instanceof LayoutProvider){
- LayoutProvider weightProvider = (LayoutProvider)pager.getAdapter();
- if(weightProvider == null){
- return false;
- }
- for (int i = 0; i < tabCount; i++) {
- float weight = weightProvider.getPageWeight(i);
- if(weight != 0.0f){
- LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, weight == 0.0f ? 1.0f : weight);
- tabsContainer.getChildAt(i).setLayoutParams(layoutParams);
- }else{
- tabsContainer.getChildAt(i).setLayoutParams(expandedTabLayoutParams);
- }
-
- }
- }
- return false;
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
-
- if (!shouldExpand || MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED) {
- setTabLayoutParams();
- return;
- }
-
- int myWidth = getMeasuredWidth();
- int childWidth = 0;
- for (int i = 0; i < tabCount; i++) {
- childWidth += tabsContainer.getChildAt(i).getMeasuredWidth();
- }
-
- if (!checkedTabWidths && childWidth > 0 && myWidth > 0) {
-
- if (childWidth <= myWidth) {
- if(!setTabLayoutParams()){
- for (int i = 0; i < tabCount; i++) {
- tabsContainer.getChildAt(i).setLayoutParams(expandedTabLayoutParams);
- }
- }
- }
-
- checkedTabWidths = true;
- }
- }
-
- private void scrollToChild(int position, int offset) {
-
- if (tabCount == 0) {
- return;
- }
-
- int newScrollX = tabsContainer.getChildAt(position).getLeft() + offset;
-
- if (position > 0 || offset > 0) {
- newScrollX -= scrollOffset;
- }
-
- if (newScrollX != lastScrollX) {
- lastScrollX = newScrollX;
- scrollTo(newScrollX, 0);
- }
-
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
- super.onDraw(canvas);
-
- if (isInEditMode() || tabCount == 0) {
- return;
- }
-
- if(tabDrawMode == DRAW_MODE_NORMAL) {
- drawTabNormalMode(canvas);
- }else {
- drawTabTextMode(canvas);
- }
- }
-
- private void drawTabNormalMode(Canvas canvas){
- final int height = getHeight();
-
- // 设置提示下划线的颜色
-
- rectPaint.setColor(indicatorColor);
-
- View currentTab = tabsContainer.getChildAt(currentPosition);
- float lineLeft = currentTab.getLeft();
- float lineRight = currentTab.getRight();
-
- if (currentPositionOffset > 0f && currentPosition < tabCount - 1) {
-
- View nextTab = tabsContainer.getChildAt(currentPosition + 1);
- final float nextTabLeft = nextTab.getLeft();
- final float nextTabRight = nextTab.getRight();
-
- lineLeft = (currentPositionOffset * nextTabLeft + (1f - currentPositionOffset) * lineLeft);
- lineRight = (currentPositionOffset * nextTabRight + (1f - currentPositionOffset) * lineRight);
-
- }
-
- //绘制提示下划线
- canvas.drawRect(lineLeft , height - indicatorHeight, lineRight , height, rectPaint);
-
- // 绘制下划线
-
- rectPaint.setColor(underlineColor);
- canvas.drawRect(0, height - underlineHeight, tabsContainer.getWidth(), height, rectPaint);
-
- // 绘制分割线
-
- dividerPaint.setColor(dividerColor);
- for (int i = 0; i < tabCount - 1; i++) {
- View tab = tabsContainer.getChildAt(i);
- canvas.drawLine(tab.getRight(), dividerPadding, tab.getRight(), height - dividerPadding, dividerPaint);
- }
- }
-
- private void drawTabTextMode(Canvas canvas){
-
- final int height = getHeight();
-
- // 设置提示下划线的颜色
-
- rectPaint.setColor(indicatorColor);
-
- View currentTab = tabsContainer.getChildAt(currentPosition);
- float lineLeft = currentTab.getLeft();
-
- View currentTextView = ((RelativeLayout)currentTab).getChildAt(0);
- float currentTextViewLeft = currentTextView.getLeft();
- float currentTextViewRight = currentTextView.getRight();
-
- // if there is an offset, start interpolating left and right coordinates between current and next tab
- if (currentPositionOffset > 0f && currentPosition < tabCount - 1) {
-
- View nextTab = tabsContainer.getChildAt(currentPosition + 1);
- final float nextTabLeft = nextTab.getLeft();
-
- lineLeft = (currentPositionOffset * nextTabLeft + (1f - currentPositionOffset) * lineLeft);
-
- View nextTextView = ((RelativeLayout)nextTab).getChildAt(0);
- float nextTextViewLeft = nextTextView.getLeft();
- float nextTextViewRight = nextTextView.getRight();
-
- currentTextViewLeft = (currentPositionOffset * nextTextViewLeft + (1f - currentPositionOffset) * currentTextViewLeft);
- currentTextViewRight = (currentPositionOffset * nextTextViewRight + (1f - currentPositionOffset) * currentTextViewRight);
- }
-
- //绘制提示下划线
- float r = ((float)indicatorHeight) / 2;
- canvas.drawCircle(lineLeft + currentTextViewLeft + r,height - indicatorHeight + r,r,rectPaint);
- canvas.drawCircle(lineLeft + currentTextViewRight - r,height - indicatorHeight + r,r,rectPaint);
-
- canvas.drawRect(lineLeft + currentTextViewLeft + r, height - indicatorHeight, lineLeft + currentTextViewRight-r , height, rectPaint);
-
- // 分割线paint
-
- dividerPaint.setColor(dividerColor);
-
- // 下划线paint
- rectPaint.setColor(underlineColor);
-
- for (int i = 0; i < tabCount; i++) {
- View tab = tabsContainer.getChildAt(i);
- //绘制分割线
- if(i < tabCount - 1) {
- canvas.drawLine(tab.getRight(), dividerPadding, tab.getRight(), height - dividerPadding, dividerPaint);
- }
- View tabTextView = ((RelativeLayout)tab).getChildAt(0);
- canvas.drawRect(tab.getLeft() + tabTextView.getLeft(), height - underlineHeight, tab.getLeft() + tabTextView.getRight(), height, rectPaint);
- }
- }
-
- private class PageListener implements ViewPager.OnPageChangeListener {
-
- @Override
- public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
-
- currentPosition = position;
- currentPositionOffset = positionOffset;
-
- if (tabsContainer != null && tabsContainer.getChildAt(position) != null) {
- scrollToChild(position, (int) (positionOffset * tabsContainer.getChildAt(position).getWidth()));
- }
-
- invalidate();
-
- if (delegatePageListener != null) {
- delegatePageListener.onPageScrolled(position, positionOffset, positionOffsetPixels);
- }
- }
-
- @Override
- public void onPageScrollStateChanged(int state) {
- if (state == ViewPager.SCROLL_STATE_IDLE) {
- scrollToChild(pager.getCurrentItem(), 0);
- }
-
- if (delegatePageListener != null) {
- delegatePageListener.onPageScrollStateChanged(state);
- }
- }
-
- @Override
- public void onPageSelected(int position) {
-
- setSelectItem(position);
-
- if (delegatePageListener != null) {
- delegatePageListener.onPageSelected(position);
- }
- }
-
- }
-
- private void setViewResource(int position ,Object obj , TextView view){
- IconTabProvider iconTabProvider = (IconTabProvider)pager.getAdapter();
- Rect rect = iconTabProvider.getPageIconBounds(position);
- Drawable drawable = null;
- if(obj instanceof Integer) {
- int resId = (int) obj;
- if (resId != 0) {
- drawable = ResourcesCompat.getDrawable(getResources(),resId,null);
- }
- }else if(obj instanceof Bitmap){
- Bitmap bitmap = (Bitmap) obj;
- if (bitmap != null) {
- drawable = new BitmapDrawable(getResources(),bitmap);
- }
- }else if(obj instanceof Drawable){
- drawable = (Drawable) obj;
-
- }
-
- if (drawable != null) {
- if(rect != null){
- drawable.setBounds(rect);
- view.setCompoundDrawables(null, drawable, null, null);
- }else{
- view.setCompoundDrawablesWithIntrinsicBounds(null, drawable, null, null);
- }
- }
- }
-
- public void setSelectItem(int position){
- for (int i = 0; i < tabsContainer.getChildCount(); i++) {
- RelativeLayout linearLayout = ((RelativeLayout) tabsContainer.getChildAt(i));
- if (i == position) {
- ((TextView) linearLayout.getChildAt(0)).setTextColor(tabTextSelectColor);
- if (pager.getAdapter() instanceof IconTabProvider) {
- Object obj = ((IconTabProvider) pager.getAdapter()).getPageSelectIcon(i);
- setViewResource(position, obj, (TextView) linearLayout.getChildAt(0));
-// ().setCompoundDrawablesWithIntrinsicBounds(0, ((IconTabProvider) pager.getAdapter()).getPageIconSelectResId(i), 0, 0);
- }else if(pager.getAdapter() instanceof ViewTabProvider){
- View view = ((ViewTabProvider) pager.getAdapter()).onSelectIconView(i,getTabView(i),linearLayout);
- setTabView(i,view);
- }
-// ((TextView) linearLayout.getChildAt(0)).setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.home_categry_icon_f_n, 0, 0);
- } else {
- ((TextView) linearLayout.getChildAt(0)).setTextColor(tabTextColor);
- if (pager.getAdapter() instanceof IconTabProvider) {
- Object obj = ((IconTabProvider) pager.getAdapter()).getPageIcon(i);
- setViewResource(position, obj, (TextView) linearLayout.getChildAt(0));
-// ((TextView) linearLayout.getChildAt(0)).setCompoundDrawablesWithIntrinsicBounds(0, ((IconTabProvider) pager.getAdapter()).getPageIconResId(i), 0, 0);
- }else if(pager.getAdapter() instanceof ViewTabProvider){
- View view = ((ViewTabProvider) pager.getAdapter()).onIconView(i, getTabView(i), linearLayout);
- setTabView(i,view);
- }
-// ((TextView) linearLayout.getChildAt(0)).setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.home_categry_icon_n, 0, 0);
-
- }
- }
- }
-
- public void setIndicatorColor(int indicatorColor) {
- this.indicatorColor = indicatorColor;
- invalidate();
- }
-
- public void setIndicatorColorResource(int resId) {
- this.indicatorColor = getResources().getColor(resId);
- invalidate();
- }
-
- public int getIndicatorColor() {
- return this.indicatorColor;
- }
-
- public void setIndicatorHeight(int indicatorLineHeightPx) {
- this.indicatorHeight = indicatorLineHeightPx;
- invalidate();
- }
-
- public int getIndicatorHeight() {
- return indicatorHeight;
- }
-
- public void setUnderlineColor(int underlineColor) {
- this.underlineColor = underlineColor;
- invalidate();
- }
-
- public void setUnderlineColorResource(int resId) {
- this.underlineColor = getResources().getColor(resId);
- invalidate();
- }
-
- public int getUnderlineColor() {
- return underlineColor;
- }
-
- public void setDividerColor(int dividerColor) {
- this.dividerColor = dividerColor;
- invalidate();
- }
-
- public void setDividerColorResource(int resId) {
- this.dividerColor = getResources().getColor(resId);
- invalidate();
- }
-
- public int getDividerColor() {
- return dividerColor;
- }
-
- public void setUnderlineHeight(int underlineHeightPx) {
- this.underlineHeight = underlineHeightPx;
- invalidate();
- }
-
- public int getUnderlineHeight() {
- return underlineHeight;
- }
-
- public void setDividerPadding(int dividerPaddingPx) {
- this.dividerPadding = dividerPaddingPx;
- invalidate();
- }
-
- public int getDividerPadding() {
- return dividerPadding;
- }
-
- public void setScrollOffset(int scrollOffsetPx) {
- this.scrollOffset = scrollOffsetPx;
- invalidate();
- }
-
- public int getScrollOffset() {
- return scrollOffset;
- }
-
- public void setShouldExpand(boolean shouldExpand) {
- this.shouldExpand = shouldExpand;
- requestLayout();
- }
-
- public boolean getShouldExpand() {
- return shouldExpand;
- }
-
- public boolean isTextAllCaps() {
- return textAllCaps;
- }
-
- public void setAllCaps(boolean textAllCaps) {
- this.textAllCaps = textAllCaps;
- }
-
- public void setTextSize(int textSizePx) {
- this.tabTextSize = textSizePx;
- updateTabStyles();
- }
-
- public int getTextSize() {
- return tabTextSize;
- }
-
- public void setTextColor(int textColor) {
- this.tabTextColor = textColor;
- updateTabStyles();
- }
-
- public void setTextColorResource(int resId) {
- this.tabTextColor = getResources().getColor(resId);
- updateTabStyles();
- }
-
- public int getTextColor() {
- return tabTextColor;
- }
-
- public void setTypeface(Typeface typeface, int style) {
- this.tabTypeface = typeface;
- this.tabTypefaceStyle = style;
- updateTabStyles();
- }
-
- public void setTabBackground(int resId) {
- this.tabBackgroundResId = resId;
- }
-
- public int getTabBackground() {
- return tabBackgroundResId;
- }
-
- public void setTabPaddingLeftRight(int paddingPx) {
- this.tabPadding = paddingPx;
- updateTabStyles();
- }
-
- public int getTabPaddingLeftRight() {
- return tabPadding;
- }
-
- @Override
- public void onRestoreInstanceState(Parcelable state) {
- SavedState savedState = (SavedState) state;
- super.onRestoreInstanceState(savedState.getSuperState());
- currentPosition = savedState.currentPosition;
- requestLayout();
- }
-
- @Override
- public Parcelable onSaveInstanceState() {
- Parcelable superState = super.onSaveInstanceState();
- SavedState savedState = new SavedState(superState);
- savedState.currentPosition = currentPosition;
- return savedState;
- }
-
- static class SavedState extends BaseSavedState {
- int currentPosition;
-
- public SavedState(Parcelable superState) {
- super(superState);
- }
-
- private SavedState(Parcel in) {
- super(in);
- currentPosition = in.readInt();
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- super.writeToParcel(dest, flags);
- dest.writeInt(currentPosition);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public SavedState createFromParcel(Parcel in) {
- return new SavedState(in);
- }
-
- @Override
- public SavedState[] newArray(int size) {
- return new SavedState[size];
- }
- };
- }
-
-}
diff --git a/Library/src/com/lhh/apst/library/ViewHolder.java b/Library/src/com/lhh/apst/library/ViewHolder.java
deleted file mode 100644
index 5acd780..0000000
--- a/Library/src/com/lhh/apst/library/ViewHolder.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.lhh.apst.library;
-
-import android.util.SparseArray;
-import android.view.View;
-
-/**
- * Created by linhongong on 2015/9/22.
- */
-public class ViewHolder {
-
- public static T get(View view, int id) {
- @SuppressWarnings("unchecked")
- SparseArray viewHolder = (SparseArray) view.getTag();
- if (viewHolder == null) {
- viewHolder = new SparseArray();
- view.setTag(viewHolder);
- }
- View childView = viewHolder.get(id);
- if (childView == null) {
- childView = view.findViewById(id);
- viewHolder.put(id, childView);
- }
- return (T) childView;
- }
-}
diff --git a/Library/src/main/config.json b/Library/src/main/config.json
new file mode 100644
index 0000000..a54b698
--- /dev/null
+++ b/Library/src/main/config.json
@@ -0,0 +1,27 @@
+{
+ "app": {
+ "bundleName": "com.lhh.apst.advancedpagerslidingtabstrip",
+ "vendor": "lhh",
+ "version": {
+ "code": 1,
+ "name": "1.0"
+ },
+ "apiVersion": {
+ "compatible": 4,
+ "target": 5,
+ "releaseType": "Beta1"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.lhh.apst.library",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "Library",
+ "moduleType": "har"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Library/src/main/java/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java b/Library/src/main/java/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java
new file mode 100644
index 0000000..96612fb
--- /dev/null
+++ b/Library/src/main/java/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java
@@ -0,0 +1,1193 @@
+package com.lhh.apst.library;
+
+import com.lhh.apst.library.utils.TypedAttrUtils;
+import ohos.agp.colors.RgbColor;
+import ohos.agp.components.*;
+import ohos.agp.components.element.Element;
+import ohos.agp.components.element.PixelMapElement;
+import ohos.agp.components.element.ShapeElement;
+import ohos.agp.render.Canvas;
+import ohos.agp.render.Paint;
+import ohos.agp.text.Font;
+import ohos.agp.utils.Color;
+import ohos.agp.utils.Rect;
+import ohos.agp.utils.TextAlignment;
+import ohos.app.Context;
+import ohos.global.resource.NotExistException;
+import ohos.global.resource.ResourceManager;
+import ohos.global.resource.WrongTypeException;
+import ohos.media.image.PixelMap;
+import ohos.utils.PlainArray;
+
+import java.io.IOException;
+import java.util.Locale;
+
+/**
+ * Created by linhomhom on 2015/8/10.
+ */
+public class AdvancedPagerSlidingTabStrip extends ScrollView implements Component.DrawTask,
+ Component.EstimateSizeListener {
+ /**
+ * 布局属性接口
+ *
+ * @since 2021-04-30
+ */
+ public interface LayoutProvider {
+ /**
+ * 比重
+ *
+ * @param position tab位置
+ * @return 比重值
+ */
+ float getPageWeight(int position);
+
+ /**
+ * 布局规则
+ *
+ * @param position tab位置
+ * @return 规则数组
+ */
+ int[] getPageRule(int position);
+
+ /**
+ * 获取margin属性
+ *
+ * @param position tab位置
+ * @return Margins
+ */
+ Margins getPageMargins(int position);
+ }
+
+ /**
+ * Tips属性接口
+ *
+ * @since 2021-04-30
+ */
+ public interface TipsProvider {
+ /**
+ * Tips Rule
+ *
+ * @param position tab位置
+ * @return 布局集合
+ */
+ int[] getTipsRule(int position);
+
+ /**
+ * TipsMargins
+ *
+ * @param position tab位置
+ * @return Margins
+ */
+ Margins getTipsMargins(int position);
+
+ /**
+ * TipsDrawable
+ *
+ * @param position tab位置
+ * @return Element
+ */
+ Element getTipsDrawable(int position);
+ }
+
+ /**
+ * IconTab接口
+ *
+ * @since 2021-04-30
+ */
+ public interface IconTabProvider {
+ /**
+ * 获取PageIcon
+ *
+ * @param position tab位置
+ * @param Icon泛型
+ * @return Icon
+ */
+ T getPageIcon(int position);
+
+ /**
+ * 获取选中icon
+ *
+ * @param position tab位置
+ * @param Icon泛型
+ * @return Icon
+ */
+ T getPageSelectIcon(int position);
+
+ /**
+ * 获取icon Bounds
+ *
+ * @param position tab位置
+ * @return Icon
+ */
+ Rect getPageIconBounds(int position);
+ }
+
+ /**
+ * ViewTabProvider
+ *
+ * @since 2021-04-30
+ */
+ public interface ViewTabProvider {
+ /**
+ * 选中的IconView
+ *
+ * @param position tab位置
+ * @param view Component
+ * @param parent ComponentContainer
+ * @return Component
+ */
+ Component onSelectIconView(int position, Component view, ComponentContainer parent);
+
+ /**
+ * IconView
+ *
+ * @param position tab位置
+ * @param view Component
+ * @param parent ComponentContainer
+ * @return Component
+ */
+ Component onIconView(int position, Component view, ComponentContainer parent);
+
+ /**
+ * 获取布局属性
+ *
+ * @return 布局属性
+ */
+ DependentLayout.LayoutConfig getLayoutConfig();
+ }
+
+ // @formatter:on
+ private DirectionalLayout.LayoutConfig expandedTabLayoutParams;
+
+ private final PageListener pageListener = new PageListener();
+
+ /**
+ * PageSlider页面切换监听
+ */
+ public PageSlider.PageChangedListener delegatePageListener;
+
+ private DirectionalLayout tabsContainer;
+ private PageSlider pager;
+
+ private int tabCount;
+
+ private int currentPosition = 0;
+ private float currentPositionOffset = 0f;
+
+ private Paint rectPaint;
+ private Paint dividerPaint;
+
+ private boolean checkedTabWidths = false;
+
+ private int indicatorColor = 0xFF666666;
+ private int underlineColor = 0x1A000000;
+ private int dividerColor = 0x1A000000;
+
+ private boolean shouldExpand = true;
+ private boolean textAllCaps = true;
+
+ private int scrollOffset = 52;
+ private int indicatorHeight = 0;
+ private int underlineHeight = 2;
+ private int dividerPadding = 12;
+ private int tabPadding = 24;
+ private int tabPaddingTopBottom = 0;
+ private int dividerWidth = 1;
+
+ private int tabTextSize = 15;
+ private int tabTextColor = 0xFF666666;
+ private int tabTextSelectColor = 0xFF666666;
+
+ private Font tabTypefaceStyle = Font.DEFAULT;
+ private int tabDrawMode = DRAW_MODE_NORMAL;
+
+ /**
+ * 绘制模式NORMAL
+ */
+ public static final int DRAW_MODE_NORMAL = 0;
+
+ /**
+ * 绘制模式TEXT
+ */
+ public static final int DRAW_MODE_TEXT = 1;
+
+ private int lastScrollX = 0;
+
+ private Locale locale;
+ private OnTabClickListener mOnTabClickListener;
+
+ /**
+ * OnTabClickListener
+ *
+ * @since 2021-04-30
+ */
+ public interface OnTabClickListener {
+ /**
+ * 点击接口
+ *
+ * @param pos 位置
+ */
+ void onClick(int pos);
+ }
+
+ /**
+ * 构造函数
+ *
+ * @param context 上下文
+ */
+ public AdvancedPagerSlidingTabStrip(Context context) {
+ this(context, null);
+ }
+
+ /**
+ * 构造函数
+ *
+ * @param context 上下文
+ * @param attrSet AttrSet
+ */
+ public AdvancedPagerSlidingTabStrip(Context context, AttrSet attrSet) {
+ this(context, attrSet, null);
+ }
+
+ /**
+ * 构造函数
+ *
+ * @param context 上下文
+ * @param attrSet AttrSet
+ * @param styleName String
+ */
+ public AdvancedPagerSlidingTabStrip(Context context, AttrSet attrSet, String styleName) {
+ super(context, attrSet, styleName);
+ setMatchViewportEnabled(true);
+
+ tabsContainer = new DirectionalLayout(context);
+ tabsContainer.setOrientation(DirectionalLayout.HORIZONTAL);
+ LayoutConfig layoutConfig = new LayoutConfig(LayoutConfig.MATCH_PARENT, LayoutConfig.MATCH_PARENT);
+ tabsContainer.setLayoutConfig(layoutConfig);
+ addComponent(tabsContainer);
+
+ indicatorColor = TypedAttrUtils.getIntColor(attrSet, "apTabIndicatorColor", indicatorColor);
+ underlineColor = TypedAttrUtils.getIntColor(attrSet, "apTabUnderlineColor", underlineColor);
+ dividerColor = TypedAttrUtils.getIntColor(attrSet, "apTabDividerColor", dividerColor);
+ indicatorHeight = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabIndicatorHeight", indicatorHeight);
+ underlineHeight = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabUnderlineHeight", underlineHeight);
+ dividerPadding = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabDividerPadding", dividerPadding);
+ tabPadding = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabPaddingLeftRight", tabPadding);
+ tabPaddingTopBottom = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabPaddingTopBottom", tabPaddingTopBottom);
+ shouldExpand = TypedAttrUtils.getBoolean(attrSet, "apTabShouldExpand", shouldExpand);
+ scrollOffset = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabScrollOffset", scrollOffset);
+ textAllCaps = TypedAttrUtils.getBoolean(attrSet, "apTabTextAllCaps", textAllCaps);
+ tabTextSelectColor = TypedAttrUtils.getIntColor(attrSet, "apTabTextSelectColor", dividerColor);
+ tabDrawMode = TypedAttrUtils.getInt(attrSet, "apTabDrawMode", DRAW_MODE_NORMAL);
+ tabTextSize = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabTextSize", tabTextSize);
+ tabTextColor = TypedAttrUtils.getIntColor(attrSet, "apTabTextColor", tabTextColor);
+
+ rectPaint = new Paint();
+ rectPaint.setAntiAlias(true);
+ rectPaint.setStyle(Paint.Style.FILL_STYLE);
+
+ dividerPaint = new Paint();
+ dividerPaint.setAntiAlias(true);
+ dividerPaint.setStrokeWidth(dividerWidth);
+
+ expandedTabLayoutParams = new DirectionalLayout.LayoutConfig(0, LayoutConfig.MATCH_PARENT,
+ TableLayout.Alignment.ALIGNMENT_FILL, 1.0f);
+
+ if (locale == null) {
+ locale = getResourceManager().getConfiguration().getFirstLocale();
+ }
+
+ if (mViewTabCache == null) {
+ mViewTabCache = new PlainArray<>();
+ }
+
+ addDrawTask(this);
+ setEstimateSizeListener(this);
+ }
+
+ public void setOnTabClickListener(OnTabClickListener onTabClickListener) {
+ mOnTabClickListener = onTabClickListener;
+ }
+
+ /**
+ * 设置PageSlider
+ *
+ * @param pager PageSlider
+ */
+ public void setViewPager(PageSlider pager) {
+ this.pager = pager;
+
+ if (pager.getProvider() == null) {
+ throw new IllegalStateException("ViewPager does not have adapter instance.");
+ }
+
+ pager.addPageChangedListener(pageListener);
+
+ notifyDataSetChanged();
+ }
+
+ public void setOnPageChangeListener(PageSlider.PageChangedListener listener) {
+ this.delegatePageListener = listener;
+ }
+
+ /**
+ * 更新数据
+ */
+ public void notifyDataSetChanged() {
+ tabsContainer.removeAllComponents();
+ tabCount = pager.getProvider().getCount();
+
+ for (int i = 0; i < tabCount; i++) {
+ if (pager.getProvider() instanceof IconTabProvider) {
+ addIconTab(i, ((IconTabProvider) pager.getProvider()).getPageIcon(i), pager.getProvider().getPageTitle(i));
+ } else if (pager.getProvider() instanceof ViewTabProvider) {
+ addViewTab(i, ((ViewTabProvider) pager.getProvider()), pager.getProvider().getPageTitle(i));
+ } else {
+ addTextTab(i, pager.getProvider().getPageTitle(i));
+ }
+ }
+
+ updateTabStyles();
+ checkedTabWidths = false;
+ pageListener.onPageChosen(0);
+ }
+
+ private void addTextTab(final int position, String title) {
+ DependentLayout tab = new DependentLayout(getContext());
+ tab.setClickedListener(v -> {
+ if (mOnTabClickListener != null) {
+ mOnTabClickListener.onClick(position);
+ }
+ scrollToChild(position, 0);
+ pager.setCurrentPage(position);
+ });
+
+ Text txt = new Text(getContext());
+ txt.setText(title);
+ txt.setFocusable(Text.FOCUS_ENABLE);
+ txt.setTextAlignment(TextAlignment.CENTER);
+ txt.setMaxTextLines(1);
+ txt.setId(ResourceTable.String_id_tab_txt);
+ DependentLayout.LayoutConfig txtParams = new DependentLayout.LayoutConfig(LayoutConfig.MATCH_CONTENT, LayoutConfig.MATCH_CONTENT);
+ txtParams.addRule(DependentLayout.LayoutConfig.CENTER_IN_PARENT);
+ if (pager.getProvider() instanceof LayoutProvider) {
+ LayoutProvider layoutProvider = (LayoutProvider) pager.getProvider();
+ for (Integer rule : layoutProvider.getPageRule(position)) {
+ txtParams.addRule(rule);
+ }
+ Margins margins = layoutProvider.getPageMargins(position);
+ if (margins != null) {
+ txtParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
+ }
+ }
+ txt.setLayoutConfig(txtParams);
+
+ int result = getResValue(ResourceTable.Float_psts_dot_wh);
+ DependentLayout.LayoutConfig layoutParams = new DependentLayout.LayoutConfig(result, result);
+ Text dot = new Text(getContext());
+ dot.setTextColor(Color.WHITE);
+ ShapeElement shapeElement = new ShapeElement();
+ shapeElement.setRgbColor(new RgbColor(Color.BLUE.getValue()));
+ dot.setBackground(shapeElement);
+ dot.setTextAlignment(TextAlignment.CENTER);
+ dot.setMaxTextLines(1);
+ dot.setTextSize(getResValue(ResourceTable.Float_psts_dot_txt_size));
+
+ Element dot_drawable = new ShapeElement(this.mContext, ResourceTable.Graphic_apsts_tips);
+
+ boolean hasRule = false;
+ layoutParams.setMargins(0, 0, getResValue(ResourceTable.Float_psts_dot_m_right), 0);
+ if (pager.getProvider() instanceof TipsProvider) {
+ TipsProvider tipsProvider = (TipsProvider) pager.getProvider();
+ for (Integer rule : tipsProvider.getTipsRule(position)) {
+ layoutParams.addRule(rule);
+ hasRule = true;
+ }
+ Margins margins = tipsProvider.getTipsMargins(position);
+ if (margins != null) {
+ layoutParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
+ }
+
+ Element drawable = tipsProvider.getTipsDrawable(position);
+ if (drawable != null) {
+ dot_drawable = drawable;
+ }
+ }
+
+ if (!hasRule) {
+ layoutParams.addRule(DependentLayout.LayoutConfig.ALIGN_RIGHT, ResourceTable.String_id_tab_txt);
+ layoutParams.addRule(DependentLayout.LayoutConfig.ALIGN_TOP, ResourceTable.String_id_tab_txt);
+ int halfSize = getResValue(ResourceTable.Float_psts_dot_m_tv_right);
+ layoutParams.setMargins(0, 0, -halfSize, 0);
+ }
+
+ dot.setBackground(dot_drawable);
+ dot.setLayoutConfig(layoutParams);
+
+ tab.addComponent(txt, 0);
+ tab.addComponent(dot, 1);
+ dot.setVisibility(Component.INVISIBLE);
+ tabsContainer.addComponent(tab);
+ }
+
+ /**
+ * 展示红点
+ *
+ * @param index 当前位置
+ */
+ public void showDot(int index) {
+ DependentLayout tab = (DependentLayout) tabsContainer.getComponentAt(index);
+ Text dot_layout = (Text) tab.getComponentAt(tab.getChildCount() - 1);
+ dot_layout.setText("");
+ dot_layout.setVisibility(Component.VISIBLE);
+ }
+
+ /**
+ * 展示红点
+ *
+ * @param index 当前位置
+ * @param dotTxt 红点文字
+ */
+ public void showDot(int index, String dotTxt) {
+ DependentLayout tab = (DependentLayout) tabsContainer.getComponentAt(index);
+ Text dot_layout = (Text) tab.getComponentAt(tab.getChildCount() - 1);
+ dot_layout.setText(dotTxt);
+ dot_layout.setPaddingLeft(10);
+ dot_layout.setPaddingRight(10);
+ dot_layout.setVisibility(Component.VISIBLE);
+ }
+
+ /**
+ * 隐藏红点
+ *
+ * @param index 当前位置
+ */
+ public void hideDot(int index) {
+ DependentLayout tab = (DependentLayout) tabsContainer.getComponentAt(index);
+ Text dot_layout = (Text) tab.getComponentAt(tab.getChildCount() - 1);
+ dot_layout.setVisibility(Component.INVISIBLE);
+ }
+
+ private PlainArray mViewTabCache;
+
+ private Component getTabView(int position) {
+ return mViewTabCache.get(position).get();
+ }
+
+ private void setTabView(int position, Component view) {
+ mViewTabCache.put(position, view);
+ }
+
+ private void addViewTab(final int position, ViewTabProvider provider, String title) {
+ DependentLayout tab = new DependentLayout(getContext());
+ tab.setClickedListener(v -> {
+ if (mOnTabClickListener != null) {
+ mOnTabClickListener.onClick(position);
+ }
+ scrollToChild(position, 0);
+ pager.setCurrentPage(position);
+ });
+
+ // 文本和图
+ Text txt = new Text(getContext());
+ txt.setText(title);
+ txt.setFocusable(Text.FOCUS_ENABLE);
+ txt.setTextAlignment(TextAlignment.CENTER);
+ txt.setMaxTextLines(1);
+ txt.setId(ResourceTable.String_id_tab_txt);
+ DependentLayout.LayoutConfig txtParams = new DependentLayout.LayoutConfig(
+ DependentLayout.LayoutConfig.MATCH_CONTENT,
+ DependentLayout.LayoutConfig.MATCH_CONTENT);
+ txtParams.addRule(DependentLayout.LayoutConfig.HORIZONTAL_CENTER);
+ txtParams.addRule(DependentLayout.LayoutConfig.ALIGN_PARENT_BOTTOM);
+ if (pager.getProvider() instanceof LayoutProvider) {
+ LayoutProvider layoutProvider = (LayoutProvider) pager.getProvider();
+ for (Integer rule : layoutProvider.getPageRule(position)) {
+ txtParams.addRule(rule);
+ }
+ Margins margins = layoutProvider.getPageMargins(position);
+ if (margins != null) {
+ txtParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
+ }
+ }
+ txtParams.addRule(DependentLayout.LayoutConfig.HORIZONTAL_CENTER);
+ txtParams.addRule(DependentLayout.LayoutConfig.ALIGN_PARENT_BOTTOM);
+ txt.setLayoutConfig(txtParams);
+
+ // 使用缓存
+ Component view = provider.onIconView(position, null, tab);
+
+ // 保存view到缓存中
+ setTabView(position, view);
+
+ DependentLayout.LayoutConfig viewLayoutParams
+ = provider.getLayoutConfig();
+ viewLayoutParams.addRule(DependentLayout.LayoutConfig.HORIZONTAL_CENTER);
+ viewLayoutParams.addRule(DependentLayout.LayoutConfig.ABOVE, ResourceTable.String_id_tab_txt);
+ view.setLayoutConfig(viewLayoutParams);
+
+ DependentLayout.LayoutConfig layoutParams =
+ new DependentLayout.LayoutConfig(ComponentContainer.LayoutConfig.MATCH_CONTENT,
+ ComponentContainer.LayoutConfig.MATCH_CONTENT);
+ Text dot = new Text(getContext());
+ dot.setTextColor(Color.WHITE);
+
+ ShapeElement shapeElement = new ShapeElement();
+ shapeElement.setRgbColor(new RgbColor(Color.BLUE.getValue()));
+ dot.setBackground(shapeElement);
+ dot.setTextAlignment(TextAlignment.CENTER);
+ dot.setMaxTextLines(1);
+ dot.setTextSize(getResValue(ResourceTable.Float_psts_dot_txt_size));
+
+ Element dot_drawable = new ShapeElement(this.mContext, ResourceTable.Graphic_apsts_tips);
+
+ boolean hasRule = false;
+ layoutParams.setMargins(0, 15, getResValue(ResourceTable.Float_psts_dot_m_right), 0);
+ if (pager.getProvider() instanceof TipsProvider) {
+ TipsProvider tipsProvider = (TipsProvider) pager.getProvider();
+ for (Integer rule : tipsProvider.getTipsRule(position)) {
+ layoutParams.addRule(rule);
+ hasRule = true;
+ }
+ Margins margins = tipsProvider.getTipsMargins(position);
+ if (margins != null) {
+ layoutParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
+ }
+ Element drawable = tipsProvider.getTipsDrawable(position);
+ if (drawable != null) {
+ dot_drawable = drawable;
+ }
+ }
+
+ if (!hasRule) {
+ layoutParams.addRule(DependentLayout.LayoutConfig.ALIGN_PARENT_RIGHT);
+ }
+
+ dot.setBackground(dot_drawable);
+ dot.setLayoutConfig(layoutParams);
+
+ tab.addComponent(txt, 0);
+ tab.addComponent(view, 1);
+ tab.addComponent(dot, 2);
+ dot.setVisibility(Component.INVISIBLE);
+ tabsContainer.addComponent(tab);
+ }
+
+ private void addIconTab(final int position, Object res, String text) {
+ DependentLayout tab = new DependentLayout(getContext());
+ tab.setClickedListener(v -> {
+ if (mOnTabClickListener != null) {
+ mOnTabClickListener.onClick(position);
+ }
+ scrollToChild(position, 0);
+ pager.setCurrentPage(position);
+ });
+
+ // 文本和图
+ Text txt = new Text(getContext());
+ txt.setText(text);
+ txt.setFocusable(Text.FOCUS_ENABLE);
+ txt.setTextAlignment(TextAlignment.CENTER);
+ txt.setMaxTextLines(1);
+ txt.setId(ResourceTable.String_id_tab_txt);
+ DependentLayout.LayoutConfig txtParams = new DependentLayout.LayoutConfig(
+ DependentLayout.LayoutConfig.MATCH_CONTENT,
+ DependentLayout.LayoutConfig.MATCH_CONTENT);
+ txtParams.addRule(DependentLayout.LayoutConfig.CENTER_IN_PARENT);
+ if (pager.getProvider() instanceof LayoutProvider) {
+ LayoutProvider layoutProvider = (LayoutProvider) pager.getProvider();
+ for (Integer rule : layoutProvider.getPageRule(position)) {
+ txtParams.addRule(rule);
+ }
+ Margins margins = layoutProvider.getPageMargins(position);
+ if (margins != null) {
+ txtParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
+ }
+ }
+ txt.setLayoutConfig(txtParams);
+
+ setViewResource(position, res, txt);
+
+ DependentLayout.LayoutConfig layoutParams = new DependentLayout.LayoutConfig(ComponentContainer.LayoutConfig.MATCH_CONTENT, ComponentContainer.LayoutConfig.MATCH_CONTENT);
+ Text dot = new Text(getContext());
+ dot.setTextColor(Color.WHITE);
+ ShapeElement shapeElement = new ShapeElement();
+ shapeElement.setRgbColor(new RgbColor(Color.BLUE.getValue()));
+ dot.setBackground(shapeElement);
+ dot.setTextAlignment(TextAlignment.CENTER);
+ dot.setMaxTextLines(1);
+ dot.setTextSize(getResValue(ResourceTable.Float_psts_dot_txt_size));
+
+ Element dot_drawable = new ShapeElement(this.mContext, ResourceTable.Graphic_apsts_tips);
+
+ boolean hasRule = false;
+ layoutParams.setMargins(0, 15, getResValue(ResourceTable.Float_psts_dot_m_right), 0);
+ if (pager.getProvider() instanceof TipsProvider) {
+ TipsProvider tipsProvider = (TipsProvider) pager.getProvider();
+ for (Integer rule : tipsProvider.getTipsRule(position)) {
+ layoutParams.addRule(rule);
+ hasRule = true;
+ }
+ Margins margins = tipsProvider.getTipsMargins(position);
+ if (margins != null) {
+ layoutParams.setMargins(margins.mLeft, margins.mTop, margins.mRight, margins.mBottom);
+ }
+ Element drawable = tipsProvider.getTipsDrawable(position);
+ if (drawable != null) {
+ dot_drawable = drawable;
+ }
+ }
+
+ if (!hasRule) {
+ layoutParams.addRule(DependentLayout.LayoutConfig.ALIGN_PARENT_RIGHT);
+ }
+
+ dot.setBackground(dot_drawable);
+ dot.setLayoutConfig(layoutParams);
+
+ tab.addComponent(txt, 0);
+ tab.addComponent(dot, 1);
+ dot.setVisibility(Component.INVISIBLE);
+ tabsContainer.addComponent(tab);
+ }
+
+ /**
+ * 获取tab Component
+ *
+ * @param pos tab位置
+ * @return Component tab元素
+ */
+ public Component getTabAt(int pos) {
+ if (pos >= tabsContainer.getChildCount()) {
+ throw new IllegalStateException("pos is too big.");
+ }
+ return tabsContainer.getComponentAt(pos);
+ }
+
+ private void updateTabStyles() {
+ for (int i = 0; i < tabCount; i++) {
+ Component v = tabsContainer.getComponentAt(i);
+ v.setLayoutConfig(expandedTabLayoutParams);
+
+ if (shouldExpand) {
+ v.setPadding(0, 0, 0, 0);
+ } else {
+ v.setPadding(tabPadding, tabPaddingTopBottom, tabPadding, tabPaddingTopBottom);
+ }
+
+ if (v instanceof DependentLayout) {
+ DependentLayout tab = (DependentLayout) v;
+ Text tv = (Text) tab.getComponentAt(0);
+ tv.setTextSize(tabTextSize, Text.TextSizeType.FP);
+ tv.setFont(tabTypefaceStyle);
+ tv.setTextColor(new Color(tabTextColor));
+
+ // setAllCaps() is only available from API 14, so the upper case is made manually if we are on a
+ // pre-ICS-build
+ if (textAllCaps) {
+ tv.setText(tv.getText().toUpperCase(locale));
+ }
+ }
+ }
+ }
+
+ /**
+ * 设置布局属性
+ *
+ * @return 是否设置成功
+ */
+ public boolean setTabLayoutParams() {
+ if (pager.getProvider() instanceof LayoutProvider) {
+ LayoutProvider weightProvider = (LayoutProvider) pager.getProvider();
+ if (weightProvider == null) {
+ return false;
+ }
+ for (int i = 0; i < tabCount; i++) {
+ float weight = weightProvider.getPageWeight(i);
+ if (weight != 0.0f) {
+ DirectionalLayout.LayoutConfig layoutParams = new DirectionalLayout.LayoutConfig(0, DirectionalLayout.LayoutConfig.MATCH_PARENT, TableLayout.Alignment.ALIGNMENT_FILL, weight == 0.0f ? 1.0f : weight);
+ tabsContainer.getComponentAt(i).setLayoutConfig(layoutParams);
+ } else {
+ tabsContainer.getComponentAt(i).setLayoutConfig(expandedTabLayoutParams);
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onEstimateSize(int widthMeasureSpec, int heightMeasureSpec) {
+ if (!shouldExpand || EstimateSpec.getMode(widthMeasureSpec) == EstimateSpec.UNCONSTRAINT) {
+ setTabLayoutParams();
+ return false;
+ }
+
+ int myWidth = getEstimatedWidth();
+ int childWidth = 0;
+ for (int i = 0; i < tabCount; i++) {
+ childWidth += tabsContainer.getComponentAt(i).getEstimatedWidth();
+ }
+
+ if (!checkedTabWidths && childWidth > 0 && myWidth > 0) {
+ if (childWidth <= myWidth) {
+ if (!setTabLayoutParams()) {
+ for (int i = 0; i < tabCount; i++) {
+ tabsContainer.getComponentAt(i).setLayoutConfig(expandedTabLayoutParams);
+ }
+ }
+ }
+
+ checkedTabWidths = true;
+ }
+ return true;
+ }
+
+ private void scrollToChild(int position, int offset) {
+ if (tabCount == 0) {
+ return;
+ }
+
+ int newScrollX = tabsContainer.getComponentAt(position).getLeft() + offset;
+
+ if (position > 0 || offset > 0) {
+ newScrollX -= scrollOffset;
+ }
+
+ if (newScrollX != lastScrollX) {
+ lastScrollX = newScrollX;
+ scrollTo(newScrollX, 0);
+ }
+ }
+
+ @Override
+ public void onDraw(Component component, Canvas canvas) {
+ if (tabCount == 0) {
+ return;
+ }
+
+ if (tabDrawMode == DRAW_MODE_NORMAL) {
+ drawTabNormalMode(canvas);
+ } else {
+ drawTabTextMode(canvas);
+ }
+ }
+
+ private void drawTabNormalMode(Canvas canvas) {
+ final int height = getHeight();
+ // 设置提示下划线的颜色
+ rectPaint.setColor(new Color(indicatorColor));
+
+ Component currentTab = tabsContainer.getComponentAt(currentPosition);
+ float lineLeft = currentTab.getLeft();
+ float lineRight = currentTab.getRight();
+
+ // 绘制提示下划线
+ canvas.drawRect(lineLeft, height - indicatorHeight, lineRight, height, rectPaint);
+
+ // 绘制下划线
+ rectPaint.setColor(new Color(underlineColor));
+ canvas.drawRect(0, height - underlineHeight, tabsContainer.getWidth(), height, rectPaint);
+
+ // 绘制分割线
+ dividerPaint.setColor(new Color(dividerColor));
+ for (int i = 0; i < tabCount - 1; i++) {
+ Component tab = tabsContainer.getComponentAt(i);
+ canvas.drawLine(tab.getRight(), dividerPadding, tab.getRight(), height - dividerPadding, dividerPaint);
+ }
+ }
+
+ private void drawTabTextMode(Canvas canvas) {
+ final int height = getHeight();
+
+ // 设置提示下划线的颜色
+ rectPaint.setColor(new Color(indicatorColor));
+
+ Component currentTab = tabsContainer.getComponentAt(currentPosition);
+ float lineLeft = currentTab.getLeft();
+
+ Component currentTextView = ((DependentLayout) currentTab).getComponentAt(0);
+ float currentTextViewLeft = currentTextView.getLeft();
+ float currentTextViewRight = currentTextView.getRight();
+
+ // 绘制提示下划线
+ float r = ((float) indicatorHeight) / 2;
+ canvas.drawCircle(lineLeft + currentTextViewLeft + r, height - indicatorHeight + r, r, rectPaint);
+ canvas.drawCircle(lineLeft + currentTextViewRight - r, height - indicatorHeight + r, r, rectPaint);
+
+ canvas.drawRect(lineLeft + currentTextViewLeft + r, height - indicatorHeight, lineLeft + currentTextViewRight - r, height, rectPaint);
+
+ // 分割线paint
+ dividerPaint.setColor(new Color(dividerColor));
+
+ // 下划线paint
+ rectPaint.setColor(new Color(underlineColor));
+
+ for (int i = 0; i < tabCount; i++) {
+ Component tab = tabsContainer.getComponentAt(i);
+ //绘制分割线
+ if (i < tabCount - 1) {
+ canvas.drawLine(tab.getRight(), dividerPadding, tab.getRight(), height - dividerPadding, dividerPaint);
+ }
+ Component tabTextView = ((DependentLayout) tab).getComponentAt(0);
+ canvas.drawRect(tab.getLeft() + tabTextView.getLeft(), height - underlineHeight, tab.getLeft() + tabTextView.getRight(), height, rectPaint);
+ }
+ }
+
+ /**
+ * PageListener
+ *
+ * @since 2021-04-30
+ */
+ private class PageListener implements PageSlider.PageChangedListener {
+ @Override
+ public void onPageSliding(int position, float positionOffset, int positionOffsetPixels) {
+ currentPositionOffset = positionOffset;
+
+ if (tabsContainer != null && tabsContainer.getComponentAt(position) != null) {
+ scrollToChild(position, (int) (positionOffset * tabsContainer.getComponentAt(position).getWidth()));
+ }
+
+ invalidate();
+
+ if (delegatePageListener != null) {
+ delegatePageListener.onPageSliding(position, positionOffset, positionOffsetPixels);
+ }
+ }
+
+ @Override
+ public void onPageSlideStateChanged(int state) {
+ if (state == PageSlider.SCROLL_IDLE_STAGE) {
+ scrollToChild(pager.getCurrentPage(), 0);
+ }
+
+ if (delegatePageListener != null) {
+ delegatePageListener.onPageSlideStateChanged(state);
+ }
+ }
+
+ @Override
+ public void onPageChosen(int position) {
+ setSelectItem(position);
+
+ if (delegatePageListener != null) {
+ delegatePageListener.onPageChosen(position);
+ }
+ currentPosition = position;
+ invalidate();
+ }
+ }
+
+ private void setViewResource(int position, Object obj, Text view) {
+ IconTabProvider iconTabProvider = (IconTabProvider) pager.getProvider();
+ Rect rect = iconTabProvider.getPageIconBounds(position);
+ Element drawable = null;
+ if (obj instanceof Integer) {
+ int resId = (int) obj;
+ if (resId != 0) {
+ drawable = getResElement(resId);
+ }
+ } else if (obj instanceof PixelMap) {
+ PixelMap bitmap = (PixelMap) obj;
+ if (bitmap != null) {
+ drawable = new PixelMapElement(bitmap);
+ }
+ } else if (obj instanceof Element) {
+ drawable = (Element) obj;
+ }
+
+ if (drawable != null) {
+ if (rect != null) {
+ drawable.setBounds(rect);
+ view.setAroundElements(null, drawable, null, null);
+ } else {
+ view.setAroundElements(null, drawable, null, null);
+ }
+ }
+ }
+
+ /**
+ * 选中item刷新状态
+ *
+ * @param position item位置
+ */
+ public void setSelectItem(int position) {
+ for (int i = 0; i < tabsContainer.getChildCount(); i++) {
+ DependentLayout linearLayout = (DependentLayout) tabsContainer.getComponentAt(i);
+ if (i == position) {
+ ((Text) linearLayout.getComponentAt(0)).setTextColor(new Color(tabTextSelectColor));
+ if (pager.getProvider() instanceof IconTabProvider) {
+ Object obj = ((IconTabProvider) pager.getProvider()).getPageSelectIcon(i);
+ setViewResource(position, obj, (Text) linearLayout.getComponentAt(0));
+ } else if (pager.getProvider() instanceof ViewTabProvider) {
+ Component view = ((ViewTabProvider) pager.getProvider()).onSelectIconView(i, getTabView(i), linearLayout);
+ setTabView(i, view);
+ changeIconView(linearLayout, view);
+ }
+ } else {
+ ((Text) linearLayout.getComponentAt(0)).setTextColor(new Color(tabTextColor));
+ if (pager.getProvider() instanceof IconTabProvider) {
+ Object obj = ((IconTabProvider) pager.getProvider()).getPageIcon(i);
+ setViewResource(position, obj, (Text) linearLayout.getComponentAt(0));
+ } else if (pager.getProvider() instanceof ViewTabProvider) {
+ Component view = ((ViewTabProvider) pager.getProvider()).onIconView(i, getTabView(i), linearLayout);
+ setTabView(i, view);
+ changeIconView(linearLayout, view);
+ }
+ }
+ }
+ }
+
+ private void changeIconView(DependentLayout linearLayout, Component view) {
+ DependentLayout.LayoutConfig viewLayoutParams
+ = ((ViewTabProvider) pager.getProvider()).getLayoutConfig();
+ viewLayoutParams.addRule(DependentLayout.LayoutConfig.HORIZONTAL_CENTER);
+ viewLayoutParams.addRule(DependentLayout.LayoutConfig.ABOVE, ResourceTable.String_id_tab_txt);
+ view.setLayoutConfig(viewLayoutParams);
+ linearLayout.removeComponentAt(1);
+ linearLayout.addComponent(view, 1);
+ }
+
+ /**
+ * 设置指标颜色
+ *
+ * @param indicatorColor 颜色值
+ */
+ public void setIndicatorColor(int indicatorColor) {
+ this.indicatorColor = indicatorColor;
+ invalidate();
+ }
+
+ /**
+ * 设置指标颜色资源
+ *
+ * @param resId 资源id
+ */
+ public void setIndicatorColorResource(int resId) {
+ this.indicatorColor = getColorValue(resId);
+ invalidate();
+ }
+
+ public int getIndicatorColor() {
+ return this.indicatorColor;
+ }
+
+ /**
+ * 设置指标高度
+ *
+ * @param indicatorLineHeightPx 指标高度
+ */
+ public void setIndicatorHeight(int indicatorLineHeightPx) {
+ this.indicatorHeight = indicatorLineHeightPx;
+ invalidate();
+ }
+
+ public int getIndicatorHeight() {
+ return indicatorHeight;
+ }
+
+ /**
+ * 设置下划线颜色
+ *
+ * @param underlineColor 下划线颜色
+ */
+ public void setUnderlineColor(int underlineColor) {
+ this.underlineColor = underlineColor;
+ invalidate();
+ }
+
+ /**
+ * 设置下划线颜色资源
+ *
+ * @param resId 资源id
+ */
+ public void setUnderlineColorResource(int resId) {
+ this.underlineColor = getColorValue(resId);
+ invalidate();
+ }
+
+ public int getUnderlineColor() {
+ return underlineColor;
+ }
+
+ /**
+ * 设置风格线颜色
+ *
+ * @param dividerColor 分割线颜色
+ */
+ public void setDividerColor(int dividerColor) {
+ this.dividerColor = dividerColor;
+ invalidate();
+ }
+
+ /**
+ * 设置风格线颜色资源
+ *
+ * @param resId 分割线颜色资源id
+ */
+ public void setDividerColorResource(int resId) {
+ this.dividerColor = getColorValue(resId);
+ invalidate();
+ }
+
+ public int getDividerColor() {
+ return dividerColor;
+ }
+
+ /**
+ * 设置下划线高度
+ *
+ * @param underlineHeightPx 下划线高度值
+ */
+ public void setUnderlineHeight(int underlineHeightPx) {
+ this.underlineHeight = underlineHeightPx;
+ invalidate();
+ }
+
+ public int getUnderlineHeight() {
+ return underlineHeight;
+ }
+
+ /**
+ * 设置分割线间距
+ *
+ * @param dividerPaddingPx 分割线间距值
+ */
+ public void setDividerPadding(int dividerPaddingPx) {
+ this.dividerPadding = dividerPaddingPx;
+ invalidate();
+ }
+
+ public int getDividerPadding() {
+ return dividerPadding;
+ }
+
+ /**
+ * 设置滚动偏移量
+ *
+ * @param scrollOffsetPx 滚动偏移量
+ */
+ public void setScrollOffset(int scrollOffsetPx) {
+ this.scrollOffset = scrollOffsetPx;
+ invalidate();
+ }
+
+ public int getScrollOffset() {
+ return scrollOffset;
+ }
+
+ /**
+ * 设置是否平铺展开
+ *
+ * @param shouldExpand 是否展开
+ */
+ public void setShouldExpand(boolean shouldExpand) {
+ this.shouldExpand = shouldExpand;
+ postLayout();
+ }
+
+ public boolean getShouldExpand() {
+ return shouldExpand;
+ }
+
+ public boolean isTextAllCaps() {
+ return textAllCaps;
+ }
+
+ public void setAllCaps(boolean textAllCaps) {
+ this.textAllCaps = textAllCaps;
+ }
+
+ /**
+ * 设置字体大小
+ *
+ * @param textSizePx 字体大小
+ */
+ public void setTextSize(int textSizePx) {
+ this.tabTextSize = textSizePx;
+ updateTabStyles();
+ }
+
+ public int getTextSize() {
+ return tabTextSize;
+ }
+
+ /**
+ * 设置文字颜色
+ *
+ * @param textColor 文字颜色
+ */
+ public void setTextColor(int textColor) {
+ this.tabTextColor = textColor;
+ updateTabStyles();
+ }
+
+ /**
+ * 设置字体颜色资源
+ *
+ * @param resId 资源id
+ */
+ public void setTextColorResource(int resId) {
+ this.tabTextColor = getColorValue(resId);
+ updateTabStyles();
+ }
+
+ public int getTextColor() {
+ return tabTextColor;
+ }
+
+ /**
+ * 设置字体类型
+ *
+ * @param style 字体类型
+ */
+ public void setTypeface(Font style) {
+ this.tabTypefaceStyle = style;
+ updateTabStyles();
+ }
+
+ /**
+ * 设置tab左右padding
+ *
+ * @param paddingPx padding值
+ */
+ public void setTabPaddingLeftRight(int paddingPx) {
+ this.tabPadding = paddingPx;
+ updateTabStyles();
+ }
+
+ public int getTabPaddingLeftRight() {
+ return tabPadding;
+ }
+
+ private int getResValue(int resId) {
+ ResourceManager resManager = this.getResourceManager();
+ int result = 0;
+ try {
+ result = (int) resManager.getElement(resId).getFloat();
+ } catch (IOException | NotExistException | WrongTypeException e) {
+ e.fillInStackTrace();
+ }
+ return result;
+ }
+
+ private int getColorValue(int resId) {
+ ResourceManager resManager = this.getResourceManager();
+ int color = 0;
+ try {
+ color = resManager.getElement(resId).getColor();
+ } catch (IOException | NotExistException | WrongTypeException e) {
+ e.fillInStackTrace();
+ }
+ return color;
+ }
+
+ private Element getResElement(int resId) {
+ Element element = null;
+ try {
+ element = new PixelMapElement(this.getResourceManager().getResource(resId));
+ } catch (IOException | NotExistException e) {
+ e.fillInStackTrace();
+ }
+ return element;
+ }
+}
diff --git a/Library/src/com/lhh/apst/library/CustomPagerSlidingTabStrip.java b/Library/src/main/java/com/lhh/apst/library/CustomPagerSlidingTabStrip.java
similarity index 36%
rename from Library/src/com/lhh/apst/library/CustomPagerSlidingTabStrip.java
rename to Library/src/main/java/com/lhh/apst/library/CustomPagerSlidingTabStrip.java
index e304b7c..4eeeaf7 100644
--- a/Library/src/com/lhh/apst/library/CustomPagerSlidingTabStrip.java
+++ b/Library/src/main/java/com/lhh/apst/library/CustomPagerSlidingTabStrip.java
@@ -1,47 +1,32 @@
package com.lhh.apst.library;
-import android.annotation.SuppressLint;
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.Paint.Style;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.support.v4.view.ViewPager;
-import android.util.AttributeSet;
-import android.util.DisplayMetrics;
-import android.util.SparseArray;
-import android.util.TypedValue;
-import android.view.View;
-import android.view.ViewTreeObserver.OnGlobalLayoutListener;
-import android.widget.HorizontalScrollView;
-import android.widget.LinearLayout;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Locale;
+import com.lhh.apst.library.utils.TypedAttrUtils;
+import ohos.agp.components.*;
+import ohos.agp.render.Canvas;
+import ohos.agp.render.Paint;
+import ohos.agp.utils.Color;
+import ohos.app.Context;
+import ohos.global.resource.NotExistException;
+import ohos.global.resource.WrongTypeException;
+import ohos.utils.PlainArray;
+
+import java.io.IOException;
/**
* Created by linhomhom on 2015/9/22.
*/
-public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
-
- public interface CustomTabProvider{
- public View getSelectTabView(int position, View convertView);
- public View getDisSelectTabView(int position, View convertView);
- }
- // @formatter:on
-
- private LinearLayout.LayoutParams defaultTabLayoutParams;
- private LinearLayout.LayoutParams expandedTabLayoutParams;
+public class CustomPagerSlidingTabStrip extends ScrollView implements Component.DrawTask, Component.EstimateSizeListener {
+ private DirectionalLayout.LayoutConfig expandedTabLayoutParams;
private final PageListener pageListener = new PageListener();
- public ViewPager.OnPageChangeListener delegatePageListener;
- private LinearLayout tabsContainer;
- private ViewPager pager;
+ /**
+ * PageSlider页面切换监听
+ */
+ public PageSlider.PageChangedListener delegatePageListener;
+
+ private DirectionalLayout tabsContainer;
+ private PageSlider pager;
private int tabCount;
@@ -60,8 +45,8 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
private boolean shouldExpand = true;
private int scrollOffset = 52;
- private int indicatorHeight = 3;
- private int underlineHeight = 2;
+ private int indicatorHeight = 10;
+ private int underlineHeight = 10;
private int dividerPadding = 12;
private int tabPadding = 24;
private int tabPaddingTopBottom = 0;
@@ -69,186 +54,215 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
private int lastScrollX = 0;
- private int tabBackgroundResId = R.drawable.psts_background_tab;
-// private int tabBackgroundResId;
-
- private Locale locale;
private OnTabClickListener mOnTabClickListener;
- public interface OnTabClickListener{
- public void onClick(int pos);
- }
+ /**
+ * Tab点击接口
+ *
+ * @since 2021-04-30
+ */
+ public interface OnTabClickListener {
+ /**
+ * 点击方法
+ *
+ * @param pos 点击位置
+ */
+ void onClick(int pos);
+ }
+
+ /**
+ * CustomTabProvider
+ *
+ * @since 2021-04-30
+ */
+ public interface CustomTabProvider {
+ /**
+ * 获取选中tabView
+ *
+ * @param position 选中位置
+ * @param convertView Component
+ * @return Component
+ */
+ Component getSelectTabView(int position, Component convertView);
+
+ /**
+ * 获取未选中tabView
+ *
+ * @param position 选中位置
+ * @param convertView Component
+ * @return Component
+ */
+ Component getDisSelectTabView(int position, Component convertView);
+ }
+
+ /**
+ * 构造函数
+ *
+ * @param context 上下文
+ */
public CustomPagerSlidingTabStrip(Context context) {
this(context, null);
}
- public CustomPagerSlidingTabStrip(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public CustomPagerSlidingTabStrip(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
-
- setFillViewport(true);
- setWillNotDraw(false);
-
- tabsContainer = new LinearLayout(context);
- tabsContainer.setOrientation(LinearLayout.HORIZONTAL);
- tabsContainer.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
- addView(tabsContainer);
-
- DisplayMetrics dm = getResources().getDisplayMetrics();
-
- scrollOffset = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, scrollOffset, dm);
- indicatorHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, indicatorHeight, dm);
- underlineHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, underlineHeight, dm);
- dividerPadding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dividerPadding, dm);
- tabPadding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, tabPadding, dm);
- dividerWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dividerWidth, dm);
-
- // get system attrs (android:textSize and android:textColor)
-
- TypedArray a = null;
-
- // get custom attrs
-
-
- a = context.obtainStyledAttributes(attrs, R.styleable.AdvancedPagerSlidingTabStrip);
-
- indicatorColor = a.getColor(R.styleable.AdvancedPagerSlidingTabStrip_apTabIndicatorColor, indicatorColor);
- underlineColor = a.getColor(R.styleable.AdvancedPagerSlidingTabStrip_apTabUnderlineColor, underlineColor);
- dividerColor = a.getColor(R.styleable.AdvancedPagerSlidingTabStrip_apTabDividerColor, dividerColor);
- indicatorHeight = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabIndicatorHeight, indicatorHeight);
- underlineHeight = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabUnderlineHeight, underlineHeight);
- dividerPadding = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabDividerPadding, dividerPadding);
- tabPadding = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabPaddingLeftRight, tabPadding);
- tabPaddingTopBottom = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabPaddingTopBottom, tabPaddingTopBottom);
- tabBackgroundResId = a.getResourceId(R.styleable.AdvancedPagerSlidingTabStrip_apTabBackground, tabBackgroundResId);
- shouldExpand = a.getBoolean(R.styleable.AdvancedPagerSlidingTabStrip_apTabShouldExpand, shouldExpand);
- scrollOffset = a.getDimensionPixelSize(R.styleable.AdvancedPagerSlidingTabStrip_apTabScrollOffset, scrollOffset);
-
- a.recycle();
+ /**
+ * 构造函数
+ *
+ * @param context 上下文
+ * @param attrSet AttrSet
+ */
+ public CustomPagerSlidingTabStrip(Context context, AttrSet attrSet) {
+ this(context, attrSet, null);
+ }
+
+ /**
+ * 构造函数
+ *
+ * @param context 上下文
+ * @param attrSet AttrSet
+ * @param styleName String
+ */
+ public CustomPagerSlidingTabStrip(Context context, AttrSet attrSet, String styleName) {
+ super(context, attrSet, styleName);
+ setMatchViewportEnabled(true);
+
+ tabsContainer = new DirectionalLayout(context);
+ tabsContainer.setOrientation(DirectionalLayout.HORIZONTAL);
+ LayoutConfig layoutConfig = new LayoutConfig(LayoutConfig.MATCH_PARENT, LayoutConfig.MATCH_PARENT);
+ tabsContainer.setLayoutConfig(layoutConfig);
+ addComponent(tabsContainer);
+
+ indicatorColor = TypedAttrUtils.getIntColor(attrSet, "apTabIndicatorColor", indicatorColor);
+ underlineColor = TypedAttrUtils.getIntColor(attrSet, "apTabUnderlineColor", underlineColor);
+ dividerColor = TypedAttrUtils.getIntColor(attrSet, "apTabDividerColor", dividerColor);
+ indicatorHeight = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabIndicatorHeight", indicatorHeight);
+ underlineHeight = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabUnderlineHeight", underlineHeight);
+ dividerPadding = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabDividerPadding", dividerPadding);
+ tabPadding = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabPaddingLeftRight", tabPadding);
+ tabPaddingTopBottom = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabPaddingTopBottom", tabPaddingTopBottom);
+ shouldExpand = TypedAttrUtils.getBoolean(attrSet, "apTabShouldExpand", shouldExpand);
+ scrollOffset = TypedAttrUtils.getDimensionPixelSize(attrSet, "apTabScrollOffset", scrollOffset);
rectPaint = new Paint();
rectPaint.setAntiAlias(true);
- rectPaint.setStyle(Style.FILL);
+ rectPaint.setStyle(Paint.Style.FILL_STYLE);
dividerPaint = new Paint();
dividerPaint.setAntiAlias(true);
dividerPaint.setStrokeWidth(dividerWidth);
- defaultTabLayoutParams = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT);
- expandedTabLayoutParams = new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1.0f);
+ expandedTabLayoutParams = new DirectionalLayout.LayoutConfig(0, LayoutConfig.MATCH_PARENT, TableLayout.Alignment.ALIGNMENT_FILL, 1.0f);
- if (locale == null) {
- locale = getResources().getConfiguration().locale;
+ if (mDisSelectTabViewCache == null) {
+ mDisSelectTabViewCache = new PlainArray<>();
}
-
- if(mDisSelectTabViewCache == null){
- mDisSelectTabViewCache = new SparseArray<>();
- }
- if(mSelectTabViewCache == null){
- mSelectTabViewCache = new SparseArray<>();
+ if (mSelectTabViewCache == null) {
+ mSelectTabViewCache = new PlainArray<>();
}
+
+ addDrawTask(this);
+ setEstimateSizeListener(this);
}
- public void setOnTabClickListener(OnTabClickListener onTabClickListener){
+ public void setOnTabClickListener(OnTabClickListener onTabClickListener) {
mOnTabClickListener = onTabClickListener;
}
- public void setViewPager(ViewPager pager) {
+ /**
+ * 设置PageSlider
+ *
+ * @param pager PageSlider
+ */
+ public void setViewPager(PageSlider pager) {
this.pager = pager;
- if (pager.getAdapter() == null) {
- throw new IllegalStateException("ViewPager does not have adapter instance.");
+ if (pager.getProvider() == null) {
+ throw new IllegalStateException("PageSlider does not have Provider instance.");
}
- pager.addOnPageChangeListener(pageListener);
+ pager.addPageChangedListener(pageListener);
notifyDataSetChanged();
}
- public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
+ public void setOnPageChangeListener(PageSlider.PageChangedListener listener) {
this.delegatePageListener = listener;
}
+ /**
+ * 更新数据
+ */
public void notifyDataSetChanged() {
-
- tabsContainer.removeAllViews();
-
- tabCount = pager.getAdapter().getCount();
+ tabsContainer.removeAllComponents();
+ tabCount = pager.getProvider().getCount();
for (int i = 0; i < tabCount; i++) {
-
- if (pager.getAdapter() instanceof CustomTabProvider) {
- View view = ((CustomTabProvider) pager.getAdapter()).getSelectTabView(i, getSelectTabView(i));
+ if (pager.getProvider() instanceof CustomTabProvider) {
+ Component view = ((CustomTabProvider) pager.getProvider()).getSelectTabView(i, null);
setSelectTabView(i, view);
updateViewStyle(view);
addTab(i, view);
}
-
}
-// updateTabStyles();
-
checkedTabWidths = false;
-
- getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
-
- @SuppressWarnings("deprecation")
- @SuppressLint("NewApi")
- @Override
- public void onGlobalLayout() {
-
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
- getViewTreeObserver().removeGlobalOnLayoutListener(this);
- } else {
- getViewTreeObserver().removeOnGlobalLayoutListener(this);
- }
-
- currentPosition = pager.getCurrentItem();
- scrollToChild(currentPosition, 0);
- }
- });
-
- pageListener.onPageSelected(0);//default
-
+ pageListener.onPageChosen(0);
}
private PageOnClickListener mPageOnClickListener;
- private void addTab(final int position, View view){
- if(mPageOnClickListener == null){
- mPageOnClickListener = new PageOnClickListener();
+ /**
+ * PageOnClickListener
+ *
+ * @since 2021-04-30
+ */
+ class PageOnClickListener implements ClickedListener {
+ @Override
+ public void onClick(Component component) {
+ int tag = (int) component.getTag();
+ if (mOnTabClickListener != null) {
+ mOnTabClickListener.onClick(tag);
+ }
+ scrollToChild(tag, 0);
+ pager.setCurrentPage(tag);
}
- view.setTag(R.id.tag_position, position);
- view.setOnClickListener(mPageOnClickListener);
- tabsContainer.addView(view);
}
- public View getTabAt(int pos) {
+ private void addTab(final int position, Component view) {
+ if (mPageOnClickListener == null) {
+ mPageOnClickListener = new PageOnClickListener();
+ }
+ view.setTag(position);
+ view.setClickedListener(mPageOnClickListener);
+ tabsContainer.addComponent(view, position);
+ }
+
+ /**
+ * 获取tab Component
+ *
+ * @param pos 选中位置
+ * @return Component
+ */
+ public Component getTabAt(int pos) {
if (pos >= tabsContainer.getChildCount()) {
throw new IllegalStateException("pos is too big.");
}
- return tabsContainer.getChildAt(pos);
+ return tabsContainer.getComponentAt(pos);
}
private void updateTabStyles() {
-
for (int i = 0; i < tabCount; i++) {
-
- View v = tabsContainer.getChildAt(i);
-
- //v.setLayoutParams(defaultTabLayoutParams);
- //my modify
+ Component v = tabsContainer.getComponentAt(i);
updateViewStyle(v);
}
-
}
- public void updateViewStyle(View v){
- v.setLayoutParams(expandedTabLayoutParams);
- v.setBackgroundResource(tabBackgroundResId);
+ /**
+ * 更新view样式
+ *
+ * @param v Component
+ */
+ public void updateViewStyle(Component v) {
+ v.setLayoutConfig(expandedTabLayoutParams);
if (shouldExpand) {
v.setPadding(0, 0, 0, 0);
} else {
@@ -257,38 +271,39 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
}
@Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ public boolean onEstimateSize(int widthMeasureSpec, int heightMeasureSpec) {
+ if (!shouldExpand || EstimateSpec.getMode(widthMeasureSpec) == EstimateSpec.UNCONSTRAINT) {
+ return false;
+ }
- if (!shouldExpand || MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED) {
- return;
+ if (tabsContainer.getChildCount() == 0) {
+ return false;
}
- int myWidth = getMeasuredWidth();
+ int myWidth = getEstimatedWidth();
int childWidth = 0;
for (int i = 0; i < tabCount; i++) {
- childWidth += tabsContainer.getChildAt(i).getMeasuredWidth();
+ childWidth += tabsContainer.getComponentAt(i).getEstimatedWidth();
}
if (!checkedTabWidths && childWidth > 0 && myWidth > 0) {
-
if (childWidth <= myWidth) {
for (int i = 0; i < tabCount; i++) {
- tabsContainer.getChildAt(i).setLayoutParams(expandedTabLayoutParams);
+ tabsContainer.getComponentAt(i).setLayoutConfig(expandedTabLayoutParams);
}
}
-
checkedTabWidths = true;
}
+
+ return true;
}
private void scrollToChild(int position, int offset) {
-
if (tabCount == 0) {
return;
}
- int newScrollX = tabsContainer.getChildAt(position).getLeft() + offset;
+ int newScrollX = tabsContainer.getComponentAt(position).getLeft() + offset;
if (position > 0 || offset > 0) {
newScrollX -= scrollOffset;
@@ -298,175 +313,163 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
lastScrollX = newScrollX;
scrollTo(newScrollX, 0);
}
-
}
@Override
- protected void onDraw(Canvas canvas) {
- super.onDraw(canvas);
-
- if (isInEditMode() || tabCount == 0) {
+ public void onDraw(Component component, Canvas canvas) {
+ if (tabCount == 0) {
return;
}
-
drawTabNormalMode(canvas);
}
- private void drawTabNormalMode(Canvas canvas){
+ private void drawTabNormalMode(Canvas canvas) {
final int height = getHeight();
// 设置提示下划线的颜色
-
- rectPaint.setColor(indicatorColor);
+ rectPaint.setColor(new Color(indicatorColor));
// default: line below current tab
- View currentTab = tabsContainer.getChildAt(currentPosition);
+ Component currentTab = tabsContainer.getComponentAt(currentPosition);
+ if (currentTab == null) {
+ return;
+ }
float lineLeft = currentTab.getLeft();
float lineRight = currentTab.getRight();
- // if there is an offset, start interpolating left and right coordinates between current and next tab
- if (currentPositionOffset > 0f && currentPosition < tabCount - 1) {
-
- View nextTab = tabsContainer.getChildAt(currentPosition + 1);
- final float nextTabLeft = nextTab.getLeft();
- final float nextTabRight = nextTab.getRight();
-
- lineLeft = (currentPositionOffset * nextTabLeft + (1f - currentPositionOffset) * lineLeft);
- lineRight = (currentPositionOffset * nextTabRight + (1f - currentPositionOffset) * lineRight);
-
- }
-
//绘制提示下划线
- canvas.drawRect(lineLeft , height - indicatorHeight, lineRight , height, rectPaint);
+ canvas.drawRect(lineLeft, height - indicatorHeight, lineRight, height, rectPaint);
// 绘制下划线
-
- rectPaint.setColor(underlineColor);
+ rectPaint.setColor(new Color(underlineColor));
canvas.drawRect(0, height - underlineHeight, tabsContainer.getWidth(), height, rectPaint);
// 绘制分割线
-
- dividerPaint.setColor(dividerColor);
+ dividerPaint.setColor(new Color(dividerColor));
for (int i = 0; i < tabCount - 1; i++) {
- View tab = tabsContainer.getChildAt(i);
+ Component tab = tabsContainer.getComponentAt(i);
canvas.drawLine(tab.getRight(), dividerPadding, tab.getRight(), height - dividerPadding, dividerPaint);
}
}
- private class PageListener implements ViewPager.OnPageChangeListener {
-
+ /**
+ * PageListener
+ *
+ * @since 2021-04-30
+ */
+ private class PageListener implements PageSlider.PageChangedListener {
@Override
- public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
-
- currentPosition = position;
+ public void onPageSliding(int position, float positionOffset, int positionOffsetPixels) {
currentPositionOffset = positionOffset;
-
- scrollToChild(position, (int) (positionOffset * tabsContainer.getChildAt(position).getWidth()));
-
+ scrollToChild(position, (int) (positionOffset * tabsContainer.getComponentAt(position).getWidth()));
invalidate();
if (delegatePageListener != null) {
- delegatePageListener.onPageScrolled(position, positionOffset, positionOffsetPixels);
+ delegatePageListener.onPageSliding(position, positionOffset, positionOffsetPixels);
}
}
@Override
- public void onPageScrollStateChanged(int state) {
- if (state == ViewPager.SCROLL_STATE_IDLE) {
- scrollToChild(pager.getCurrentItem(), 0);
+ public void onPageSlideStateChanged(int state) {
+ if (state == PageSlider.SLIDING_STATE_IDLE) {
+ scrollToChild(pager.getCurrentPage(), 0);
}
if (delegatePageListener != null) {
- delegatePageListener.onPageScrollStateChanged(state);
+ delegatePageListener.onPageSlideStateChanged(state);
}
}
@Override
- public void onPageSelected(int position) {
-
+ public void onPageChosen(int position) {
setSelectItem(position);
-
if (delegatePageListener != null) {
- delegatePageListener.onPageSelected(position);
+ delegatePageListener.onPageChosen(position);
}
+ currentPosition = position;
+ invalidate();
}
-
}
- private SparseArray mDisSelectTabViewCache;//缓存
+ private PlainArray mDisSelectTabViewCache;
- private View getDisSelectTabView(int position){
- return mDisSelectTabViewCache.get(position);
+ private Component getDisSelectTabView(int position) {
+ return mDisSelectTabViewCache.get(position).get();
}
- private void setDisSelectTabView(int position , View view){
- mDisSelectTabViewCache.put(position,view);
+ private void setDisSelectTabView(int position, Component view) {
+ mDisSelectTabViewCache.put(position, view);
}
- private SparseArray mSelectTabViewCache;//缓存
+ private PlainArray mSelectTabViewCache;
- private View getSelectTabView(int position){
- return mSelectTabViewCache.get(position);
+ private Component getSelectTabView(int position) {
+ return mSelectTabViewCache.get(position).get();
}
- private void setSelectTabView( int position ,View view){
- mSelectTabViewCache.put(position,view);
- }
-
- class PageOnClickListener implements View.OnClickListener{
-
- @Override
- public void onClick(View view) {
- int tag = (int)view.getTag(R.id.tag_position);
- if(mOnTabClickListener != null){
- mOnTabClickListener.onClick(tag);
- }
- scrollToChild(tag, 0);
- pager.setCurrentItem(tag);
- }
+ private void setSelectTabView(int position, Component view) {
+ mSelectTabViewCache.put(position, view);
}
- public void setSelectItem(int position){
- if (!(pager.getAdapter() instanceof CustomTabProvider)) {
+ /**
+ * 设置选中item
+ *
+ * @param position 当前位置
+ */
+ public void setSelectItem(int position) {
+ if (!(pager.getProvider() instanceof CustomTabProvider)) {
return;
}
- for (int i = 0; i < tabsContainer.getChildCount(); i++) {
- tabsContainer.removeViewAt(i);
+ for (int i = 0; i < tabsContainer.getChildCount(); i++) {
+ tabsContainer.removeComponentAt(i);
- View view = null;
+ Component view;
if (i == position) {
- view = ((CustomTabProvider) pager.getAdapter()).getSelectTabView(i, getSelectTabView(i));
+ view = ((CustomTabProvider) pager.getProvider()).getSelectTabView(i, null);
setSelectTabView(i, view);
-
} else {
- view = ((CustomTabProvider) pager.getAdapter()).getDisSelectTabView(i, getDisSelectTabView(i));
+ view = ((CustomTabProvider) pager.getProvider()).getDisSelectTabView(i, null);
setDisSelectTabView(i, view);
}
- view.setTag(R.id.tag_position, i);
+ view.setTag(i);
- if(mPageOnClickListener == null){
+ if (mPageOnClickListener == null) {
mPageOnClickListener = new PageOnClickListener();
}
- view.setOnClickListener(mPageOnClickListener);
+ view.setClickedListener(mPageOnClickListener);
- tabsContainer.addView(view, i);
+ tabsContainer.addComponent(view, i);
updateViewStyle(view);
}
}
+ /**
+ * 设置下标颜色值
+ *
+ * @param indicatorColor 下标颜色值
+ */
public void setIndicatorColor(int indicatorColor) {
this.indicatorColor = indicatorColor;
invalidate();
}
+ /**
+ * 设置下标颜色值
+ *
+ * @param resId 下标颜色值资源id
+ */
public void setIndicatorColorResource(int resId) {
- this.indicatorColor = getResources().getColor(resId);
+ try {
+ this.indicatorColor = getResourceManager().getElement(resId).getColor();
+ } catch (IOException | NotExistException | WrongTypeException e) {
+ e.fillInStackTrace();
+ }
invalidate();
}
@@ -474,6 +477,11 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
return this.indicatorColor;
}
+ /**
+ * 设置下标线高度
+ *
+ * @param indicatorLineHeightPx 下标线高度
+ */
public void setIndicatorHeight(int indicatorLineHeightPx) {
this.indicatorHeight = indicatorLineHeightPx;
invalidate();
@@ -483,13 +491,27 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
return indicatorHeight;
}
+ /**
+ * 设置下边线颜色值
+ *
+ * @param underlineColor 下边线颜色值
+ */
public void setUnderlineColor(int underlineColor) {
this.underlineColor = underlineColor;
invalidate();
}
+ /**
+ * 设置下边线颜色值
+ *
+ * @param resId 资源id
+ */
public void setUnderlineColorResource(int resId) {
- this.underlineColor = getResources().getColor(resId);
+ try {
+ this.underlineColor = getResourceManager().getElement(resId).getColor();
+ } catch (IOException | NotExistException | WrongTypeException e) {
+ e.fillInStackTrace();
+ }
invalidate();
}
@@ -497,13 +519,27 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
return underlineColor;
}
+ /**
+ * 设置分割线颜色值
+ *
+ * @param dividerColor 资源id
+ */
public void setDividerColor(int dividerColor) {
this.dividerColor = dividerColor;
invalidate();
}
+ /**
+ * 设置分割线颜色值
+ *
+ * @param resId 资源id
+ */
public void setDividerColorResource(int resId) {
- this.dividerColor = getResources().getColor(resId);
+ try {
+ this.dividerColor = getResourceManager().getElement(resId).getColor();
+ } catch (IOException | NotExistException | WrongTypeException e) {
+ e.fillInStackTrace();
+ }
invalidate();
}
@@ -511,6 +547,11 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
return dividerColor;
}
+ /**
+ * 设置下标线高度
+ *
+ * @param underlineHeightPx 下标线高度
+ */
public void setUnderlineHeight(int underlineHeightPx) {
this.underlineHeight = underlineHeightPx;
invalidate();
@@ -520,6 +561,11 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
return underlineHeight;
}
+ /**
+ * 设置分割线padding
+ *
+ * @param dividerPaddingPx 分割线padding
+ */
public void setDividerPadding(int dividerPaddingPx) {
this.dividerPadding = dividerPaddingPx;
invalidate();
@@ -529,6 +575,11 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
return dividerPadding;
}
+ /**
+ * 设置滚动偏移量
+ *
+ * @param scrollOffsetPx 滚动偏移量
+ */
public void setScrollOffset(int scrollOffsetPx) {
this.scrollOffset = scrollOffsetPx;
invalidate();
@@ -538,23 +589,25 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
return scrollOffset;
}
+ /**
+ * 是否展开
+ *
+ * @param shouldExpand 是否展开
+ */
public void setShouldExpand(boolean shouldExpand) {
this.shouldExpand = shouldExpand;
- requestLayout();
+ postLayout();
}
public boolean getShouldExpand() {
return shouldExpand;
}
- public void setTabBackground(int resId) {
- this.tabBackgroundResId = resId;
- }
-
- public int getTabBackground() {
- return tabBackgroundResId;
- }
-
+ /**
+ * tab左右padding
+ *
+ * @param paddingPx 左右padding值
+ */
public void setTabPaddingLeftRight(int paddingPx) {
this.tabPadding = paddingPx;
updateTabStyles();
@@ -563,52 +616,4 @@ public class CustomPagerSlidingTabStrip extends HorizontalScrollView {
public int getTabPaddingLeftRight() {
return tabPadding;
}
-
- @Override
- public void onRestoreInstanceState(Parcelable state) {
- SavedState savedState = (SavedState) state;
- super.onRestoreInstanceState(savedState.getSuperState());
- currentPosition = savedState.currentPosition;
- requestLayout();
- }
-
- @Override
- public Parcelable onSaveInstanceState() {
- Parcelable superState = super.onSaveInstanceState();
- SavedState savedState = new SavedState(superState);
- savedState.currentPosition = currentPosition;
- return savedState;
- }
-
- static class SavedState extends BaseSavedState {
- int currentPosition;
-
- public SavedState(Parcelable superState) {
- super(superState);
- }
-
- private SavedState(Parcel in) {
- super(in);
- currentPosition = in.readInt();
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- super.writeToParcel(dest, flags);
- dest.writeInt(currentPosition);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public SavedState createFromParcel(Parcel in) {
- return new SavedState(in);
- }
-
- @Override
- public SavedState[] newArray(int size) {
- return new SavedState[size];
- }
- };
- }
-
}
diff --git a/Library/src/com/lhh/apst/library/Margins.java b/Library/src/main/java/com/lhh/apst/library/Margins.java
similarity index 40%
rename from Library/src/com/lhh/apst/library/Margins.java
rename to Library/src/main/java/com/lhh/apst/library/Margins.java
index dbdbc89..3a4ffa9 100644
--- a/Library/src/com/lhh/apst/library/Margins.java
+++ b/Library/src/main/java/com/lhh/apst/library/Margins.java
@@ -3,12 +3,36 @@ package com.lhh.apst.library;
/**
* Created by Linhh on 16/3/8.
*/
-public class Margins{
+public class Margins {
+ /**
+ * 左Margin
+ */
public int mLeft;
+
+ /**
+ * 右Margin
+ */
public int mRight;
+
+ /**
+ * 上Margin
+ */
public int mTop;
+
+ /**
+ * 下Margin
+ */
public int mBottom;
- public Margins(int left, int top, int right, int bottom){
+
+ /**
+ * 构造函数
+ *
+ * @param left 左Margin
+ * @param top 上Margin
+ * @param right 右Margin
+ * @param bottom 下Margin
+ */
+ public Margins(int left, int top, int right, int bottom) {
mLeft = left;
mRight = right;
mTop = top;
diff --git a/Library/src/main/java/com/lhh/apst/library/utils/TypedAttrUtils.java b/Library/src/main/java/com/lhh/apst/library/utils/TypedAttrUtils.java
new file mode 100644
index 0000000..0e4c44d
--- /dev/null
+++ b/Library/src/main/java/com/lhh/apst/library/utils/TypedAttrUtils.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2021 The Chinese Software International Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package com.lhh.apst.library.utils;
+
+import ohos.agp.components.AttrSet;
+import ohos.agp.components.element.Element;
+import ohos.agp.utils.Color;
+import ohos.hiviewdfx.HiLog;
+import ohos.hiviewdfx.HiLogLabel;
+
+/**
+ * TypedAttrUtils
+ *
+ * @since 2021-04-13
+ */
+public class TypedAttrUtils {
+ /**
+ * 日志常量
+ */
+ public static final HiLogLabel LABEL = new HiLogLabel(HiLog.LOG_APP, 0x00201, "TypedAttrUtils");
+
+ /**
+ * 颜色工具类
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @param defValue 默认值
+ * @return int
+ */
+ public static int getIntColor(AttrSet attrs, String attrName, int defValue) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ return attrs.getAttr(attrName).get().getColorValue().getValue();
+ } else {
+ return defValue;
+ }
+ }
+
+ /**
+ * getColor
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @param defValue 默认值
+ * @return Color
+ */
+ public static Color getColor(AttrSet attrs, String attrName, Color defValue) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ return attrs.getAttr(attrName).get().getColorValue();
+ } else {
+ return defValue;
+ }
+ }
+
+ /**
+ * getBoolean
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @param isDefValue 默认值
+ * @return boolean
+ */
+ public static boolean getBoolean(AttrSet attrs, String attrName, boolean isDefValue) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ return attrs.getAttr(attrName).get().getBoolValue();
+ } else {
+ return isDefValue;
+ }
+ }
+
+ /**
+ * getString
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @param defValue 默认值
+ * @return String
+ */
+ public static String getString(AttrSet attrs, String attrName, String defValue) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ return attrs.getAttr(attrName).get().getStringValue();
+ } else {
+ return defValue;
+ }
+ }
+
+ /**
+ * getFloat
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @param defValue 默认值
+ * @return float
+ */
+ public static float getFloat(AttrSet attrs, String attrName, float defValue) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ return attrs.getAttr(attrName).get().getFloatValue();
+ } else {
+ return defValue;
+ }
+ }
+
+ /**
+ * getInt
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @param defValue 默认值
+ * @return int
+ */
+ public static int getInt(AttrSet attrs, String attrName, int defValue) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ return attrs.getAttr(attrName).get().getIntegerValue();
+ } else {
+ return defValue;
+ }
+ }
+
+ /**
+ * getDimensionPixelSize
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @param defValue 默认值
+ * @return int
+ */
+ public static int getDimensionPixelSize(AttrSet attrs, String attrName, int defValue) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ return attrs.getAttr(attrName).get().getIntegerValue();
+ } else {
+ return defValue;
+ }
+ }
+
+ /**
+ * getLayoutDimension
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @param defValue 默认值
+ * @return int
+ */
+ public static int getLayoutDimension(AttrSet attrs, String attrName, int defValue) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ HiLog.info(LABEL, "attr.getDimensionValue() = " + attrs.getAttr(attrName).get().getDimensionValue());
+ return attrs.getAttr(attrName).get().getDimensionValue();
+ } else {
+ return defValue;
+ }
+ }
+
+ /**
+ * getElement
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @param defValue 默认值
+ * @return Element
+ */
+ public static Element getElement(AttrSet attrs, String attrName, Element defValue) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ HiLog.info(LABEL, "attr.getElement() = " + attrs.getAttr(attrName).get().getElement());
+ return attrs.getAttr(attrName).get().getElement();
+ } else {
+ return defValue;
+ }
+ }
+
+ /**
+ * hasValue
+ *
+ * @param attrs 属性
+ * @param attrName 属性名
+ * @return boolean
+ */
+ public static boolean hasValue(AttrSet attrs, String attrName) {
+ if (attrs.getAttr(attrName) != null && attrs.getAttr(attrName).isPresent()) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
diff --git a/Library/src/main/resources/base/element/color.json b/Library/src/main/resources/base/element/color.json
new file mode 100644
index 0000000..7b220e6
--- /dev/null
+++ b/Library/src/main/resources/base/element/color.json
@@ -0,0 +1,12 @@
+{
+ "color": [
+ {
+ "name": "background_tab_pressed",
+ "value": "#6633B5E5"
+ },
+ {
+ "name": "red",
+ "value": "#E43F3E"
+ }
+ ]
+}
diff --git a/Library/src/main/resources/base/element/float.json b/Library/src/main/resources/base/element/float.json
new file mode 100644
index 0000000..19e2916
--- /dev/null
+++ b/Library/src/main/resources/base/element/float.json
@@ -0,0 +1,32 @@
+{
+ "float": [
+ {
+ "name": "psts_dot_wh",
+ "value": "10vp"
+ },
+ {
+ "name": "psts_indicator_circle",
+ "value": "4vp"
+ },
+ {
+ "name": "psts_dot_m_right",
+ "value": "9vp"
+ },
+ {
+ "name": "psts_dot_m_tv_right",
+ "value": "8vp"
+ },
+ {
+ "name": "psts_dot_m_top",
+ "value": "7vp"
+ },
+ {
+ "name": "psts_dot_linelayout_h",
+ "value": "23vp"
+ },
+ {
+ "name": "psts_dot_txt_size",
+ "value": "10fp"
+ }
+ ]
+}
diff --git a/Library/src/main/resources/base/element/string.json b/Library/src/main/resources/base/element/string.json
new file mode 100644
index 0000000..b2f9e9b
--- /dev/null
+++ b/Library/src/main/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "Library"
+ },
+ {
+ "name": "tag_position",
+ "value": "tag_position"
+ },
+ {
+ "name": "id_tab_txt",
+ "value": "id_tab_txt"
+ }
+ ]
+}
diff --git a/Library/src/main/resources/base/graphic/apsts_tips.xml b/Library/src/main/resources/base/graphic/apsts_tips.xml
new file mode 100644
index 0000000..7ba893f
--- /dev/null
+++ b/Library/src/main/resources/base/graphic/apsts_tips.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Library/src/main/resources/base/graphic/psts_background_tab.xml b/Library/src/main/resources/base/graphic/psts_background_tab.xml
new file mode 100644
index 0000000..c835995
--- /dev/null
+++ b/Library/src/main/resources/base/graphic/psts_background_tab.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Library/src/test/java/com/lhh/apst/library/ExampleTest.java b/Library/src/test/java/com/lhh/apst/library/ExampleTest.java
new file mode 100644
index 0000000..a038733
--- /dev/null
+++ b/Library/src/test/java/com/lhh/apst/library/ExampleTest.java
@@ -0,0 +1,9 @@
+package com.lhh.apst.library;
+
+import org.junit.Test;
+
+public class ExampleTest {
+ @Test
+ public void onStart() {
+ }
+}
diff --git a/Pic/Screen_20160216163404.png b/Pic/Screen_20160216163404.png
deleted file mode 100644
index 2a220a3b1ca9542ed1f39ca6fffcfd547a2a7698..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 30900
zcmeEt^;cWn^EDD6NJ%JOB*AHMDeg{jcz{scX>lm-?pD0G6x!laq`14gySqau@TT8?
z;{D~5weDKyW=+mLYwpR+oV{m9s4C08!g_;+goN};UQS9K2??1JaXkak5#M}>G5!w;
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