UnderlinePageIndicator
Paging indicator widget compatible with the ViewPager
Install / Use
npx skills add dcampogiani/UnderlinePageIndicatorInstalls into whichever agent you are using.
README
Underline Page Indicator


This indicator will underline each tab text, morphing its size while scrolling
How to use
Add JitPack repository to your build.gradle file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the Dependency
dependencies {
implementation "com.github.dcampogiani:underlinepageindicator:0.0.2"
}
Add TabLayout and UnderlinePageIndicator to XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
tools:context=".MainActivity">
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabIndicatorHeight="0dp"
app:tabMode="fixed" />
<com.danielecampogiani.underlinepageindicator.UnderlinePageIndicator
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="2dp" />
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
Style TabLayout with app:tabIndicatorHeight="0dp" and app:tabMode="fixed"
Setup with ViewPager
pager.adapter = Adapter(...)
indicator.setTabLayoutAndViewPager(tabs, pager)
Checkout the app project for an example.
Thanks
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
