SkillAgentSearch skills...

IndicatorDecorator

:full_moon_with_face::new_moon_with_face::new_moon_with_face:Indicator decorator is an indicator that can be used in ViewPager2 and RecyclerView.

Install / Use

/learn @sangcomz/IndicatorDecorator
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Image

IndicatorDecorator

Indicator decorator is an indicator that can be used in ViewPager2 and RecyclerView.

What's New in 0.2.0? :tada:

  • version update

How to Use

Gradle

    dependencies {
        implementation 'xyz.sangcomz:indicatordecorator:0.2.0'
    }

Usage

        viewPager1.addItemDecoration(IndicatorItemDecoration().apply {
            indicatorShape = CircleIndicator().apply {
                colorActive = ContextCompat.getColor(this@MainActivity, R.color.colorPrimaryDark)
            }
        })

attribute

|      Attribute Name       | Description                               |   Default Value   | |:--------------------------:|-------------------------------------------|:-------------------:| | topOffset | Top Offset with Page Item | 4DP | | bottomOffset | Bottom Offset in View | 4DP | | indicatorItemPadding | Padding between indicators | 8DP | | indicatorShape | Indicator shape | CircleIndicator | | isOverlap | Can overlap | false | | isShowBackground |Background visibility | false | | backgroundColor | Background Color | WHITE | | backgroundCornerRadius | Background Corner Radius | 8DP | | backgroundSideOffset | Background side offset | 16DP | |backgroundTopAndBottomOffset| Background top and bottom offset | 4DP |

Support Indicator Shape

  • CircleIndicator
  • DrawableIndicator
  • SquareIndicator

It can be created by extend IndicatorShape. (It's better if you make a PR)

Result Screen

| Project Name | Result Screen | |:---------:|---| | Sample | <img src="/pic/sample.gif"> |

Contribute

Welcome any contributions.

Inspired by

License

Copyright 2019 Jeong Seokwon

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.
View on GitHub
GitHub Stars34
CategoryDevelopment
Updated3mo ago
Forks5

Languages

Kotlin

Security Score

72/100

Audited on Dec 20, 2025

No findings