diff --git a/README.md b/README.md index a8cb76e..3a994ae 100644 --- a/README.md +++ b/README.md @@ -224,7 +224,7 @@ public class FigureIndicatorView extends BaseIndicatorView { } } ``` -#### (2)User custom indicator with ViewPager/ViewPager2 +#### (2)Use custom indicator with ViewPager/ViewPager2 ``` val indicatorView = findViewById(R.id.indicator_view) @@ -239,11 +239,6 @@ public class FigureIndicatorView extends BaseIndicatorView { ![QQ交流群60902509](https://github.com/zhpanvip/Resource/blob/master/image/group/qq_group.png) - -## - -**如果您觉得BannerViewPager库还不错,帮您省了不少时间,可以点击Star表示对作者的支持,也可以扫描二维码请作者喝杯咖啡。** - | Alipay | WeChat | |--|--| | ![NORMAL](https://github.com/zhpanvip/Resource/blob/master/image/pay/pay_alipay.jpg) | ![SMOOTH](https://github.com/zhpanvip/Resource/blob/master/image/pay/pay_wechat.png) | diff --git a/README_CN.md b/README_CN.md index 080ff66..1425f38 100644 --- a/README_CN.md +++ b/README_CN.md @@ -243,13 +243,6 @@ public class FigureIndicatorView extends BaseIndicatorView { ## -**如果您觉得BannerViewPager库还不错,帮您省了不少时间,可以点击Star表示对作者的支持,也可以扫描二维码请作者喝杯咖啡。** - -| Alipay | WeChat | -|--|--| -| ![NORMAL](https://github.com/zhpanvip/Resource/blob/master/image/banner/style_custum.gif) | - - ## 更多详情 [《聊一聊ViewPagerIndicator重构的一些经验》](https://juejin.im/post/5dda0b6d518825731f569a8c) diff --git a/app/release/app-release.apk b/app/release/app-release.apk index 8df803f..af9c808 100644 Binary files a/app/release/app-release.apk and b/app/release/app-release.apk differ diff --git a/app/src/main/java/com/zhpan/viewpagerindicator/MainActivity.kt b/app/src/main/java/com/zhpan/viewpagerindicator/MainActivity.kt index b472633..e06a86a 100644 --- a/app/src/main/java/com/zhpan/viewpagerindicator/MainActivity.kt +++ b/app/src/main/java/com/zhpan/viewpagerindicator/MainActivity.kt @@ -28,8 +28,8 @@ open class MainActivity : BaseDataActivity() { val dp20 = resources.getDimensionPixelOffset(R.dimen.dp_20) view_pager2.adapter = ViewPager2Adapter(getData(4)) - figureIndicator.setRadius(IndicatorUtils.dp2px(15f)) - figureIndicator.setTextSize(IndicatorUtils.dp2px(12f)) + figureIndicator.setRadius(resources.getDimensionPixelOffset(R.dimen.dp_20)) + figureIndicator.setTextSize(resources.getDimensionPixelSize(R.dimen.dp_16)) .setupWithViewPager(view_pager2) figureIndicator.setBackgroundColor(Color.parseColor("#aa118EEA")) normalColor = getResColor(R.color.red_normal_color) @@ -112,7 +112,7 @@ open class MainActivity : BaseDataActivity() { indicatorView.setIndicatorStyle(IndicatorStyle.ROUND_RECT) .setSliderGap(IndicatorUtils.dp2px(4f).toFloat()) .setSlideMode(mSlideMode) - .setSliderHeight(resources.getDimensionPixelOffset(R.dimen.dp_4).toFloat()) + .setSliderHeight(resources.getDimensionPixelOffset(R.dimen.dp_6).toFloat()) .setSliderColor(normalColor, checkedColor) .setSliderWidth(normalWidth, checkedWidth) indicatorView.notifyDataChanged() diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 1892eaa..6bf7013 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -49,7 +49,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:text="(Bitmap Drawable)" + android:text="Bitmap" + android:layout_centerHorizontal="true" android:textColor="#FFFFFF" /> @@ -58,8 +59,6 @@ android:layout_height="match_parent" android:layout_centerHorizontal="true" android:layout_centerVertical="true" - android:layout_marginStart="@dimen/dp_10" - android:layout_toEndOf="@id/rl_bitmap" android:orientation="vertical"> @@ -88,13 +88,13 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" - android:layout_marginTop="@dimen/dp_5" /> + android:layout_marginTop="@dimen/dp_10"/>