SegmentedProgressBar
Instagram like segmented progress bar for Android.
Screenshots
How does it work?
Just add the dependency to your build.gradle:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.carlosmuvi:SegmentedProgressBar:0.8.3'
}
Next, add it to your layout
<com.carlosmuvi.segmentedprogressbar.SegmentedProgressBar
android:id="@+id/segmented_progressbar"
android:layout_width="match_parent"
android:layout_height="5dp"/>
Usage and customization
Programatically
segmentedProgressBar = (SegmentedProgressBar) findViewById(R.id.segmented_progressbar);
segmentedProgressBar.setSegmentCount(7);
segmentedProgressBar.setContainerColor(Color.BLUE);
segmentedProgressBar.setFillColor(Color.GREEN);
segmentedProgressBar.playSegment(5000);
segmentedProgressBar.pause();
segmentedProgressBar.reset();
segmentedProgressBar.setCompletedSegments(3);
segmentedProgressBar.incrementCompletedSegments();
In your layout
<com.carlosmuvi.segmentedprogressbar.SegmentedProgressBar
android:id="@+id/segmented_progressbar"
android:layout_width="match_parent"
android:layout_height="5dp"
app:container_color="@color/colorAccent"
app:fill_color="@color/colorPrimary"
app:gap_size="@dimen/progressbar_gap"
app:segment_count="3"
/>
License
Copyright 2015 Carlos Munoz
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.