SegmentedProgressBar alternatives and similar packages
Based on the "Component" category.
Alternatively, view SegmentedProgressBar alternatives based on common mentions on social networks and blogs.
-
AppUpdater
A library that checks for your apps' updates on Google Play, GitHub, Amazon, F-Droid or your own server. API 9+ required. -
QREader
:white_square_button: [Android Library] Read QR codes using google's mobile vision api, but without the hassle -
InAppUpdater
Android Library to easily implement in-app updates. Support with a :star: Contributions are welcome! :raised_hands: -
Butterfly
Butterfly - A full-featured navigation framework that supports Activity、Fragment and Compose -
ChatVoicePlayer
An Android library to make the implementation of voice/audio messages' playing easier -
ContentManager
Android library for getting photo or video from a device gallery, cloud or camera. Working with samsung devices. Made by Stfalcon -
Attribouter
A lightweight "about screen" library to allow quick but customizable attribution in Android apps. -
EasyMoney-Widgets
The widgets (EditText and TextView) for support of money requirements like currency, number formatting, comma formatting etc.
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SegmentedProgressBar or a related project?
README
SegmentedProgressBar
An Instagram-like stories segmented progress bar
Setup
Add Jitpack repository to your project level build.gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
Add SegmentedProgressBar to your app's build.gradle
dependencies
dependencies {
implementation 'com.github.TOrnelas:SegmentedProgressBar:{latest-version}'
}
Find all versions available here
Usage
Add it to your layout xml file
<pt.tornelas.segmentedprogressbar.SegmentedProgressBar
android:id="@+id/spb"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_margin="8dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:segmentBackgroundColor="@color/colorAccent"
app:segmentSelectedBackgroundColor="@color/colorPrimary"
app:segmentStrokeColor="@android:color/black"
app:segmentSelectedStrokeColor="@android:color/black"
app:segmentStrokeWidth="1dp"
app:segmentCornerRadius="2dp"
app:segmentMargins="@dimen/default_segment_margin"
app:totalSegments="10"
app:timePerSegment="2000"/>
Alternatively, you can set all properties in your Fragment/Activity:
val spb = findViewById<SegmentedProgressBar>(R.id.spb)
spb.segmentCount = 10
...
Initialize it and start it
val spb = findViewById<SegmentedProgressBar>(R.id.spb)
spb.start()
Available methods
// Starts/resumes progress animation
spb.start()
// Pauses progress animation
spb.pause()
// Restarts progress animation
spb.reset()
// Completes animation of current segment, starts animating following segment
spb.next()
// Resets animation of current segment, starts animating previous segment
spb.previous()
// Resets animation of current segment
spb.restartSegment()
// Skips X segments (-X option available)
spb.skip(X)
// Restarts animation for segment at position X
spb.setPosition(X)
Set a ViewPager
You can sync a ViewPager2 with a SegmentedProgressBar by doing
spb.viewPager = viewPager
This will
- Update the SegmentedProgressBar segments automatically when a swipe action is done on a ViewPager
- Pause/Resume progress animation when user touches down/up on the view pager (Like you do to pause an Instagram story)
Set a Listener
spb.listener = object : SegmentedProgressBarListener {
override fun onPage(oldPageIndex: Int, newPageIndex: Int) {
// New page started animating
}
override fun onFinished() {
// All segments animated and finished animation
}
}
Feel free to checkout the sample on this repository
MIT License
Copyright (c) 2020 Tiago Ornelas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*Note that all licence references and agreements mentioned in the SegmentedProgressBar README section above
are relevant to that project's source code only.