Reputation: 133
I am adding progress bar to my application but I am not able to divide the progress bar into segments at runtime. Actually I am capturing the video then I start the progress bar and when I pause recording video the progress bar should get pause and after resume capturing video, the progress bar divide it into a segment and resume the progress from the last paused point,when video capturing is paused and resumed a white line should appear at the paused point
Upvotes: 0
Views: 1781
Reputation: 1
Go to the following repo:
https://github.com/muneikh/SegmentedProgressBar
Find the files here:
/progressbar/src/main/java/com/muneikh/
Add the Java files to your project and related XML.
Upvotes: 0
Reputation: 132
In build.gradle (App level)
dependencies {
compile 'com.github.carlosmuvi:SegmentedProgressBar:0.8.1'}
In build.gradle (project level)
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
In your layout xml
<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"
/>
in your activity class
segmentedProgressBar = (SegmentedProgressBar) findViewById(R.id.segmented_progressbar);
// number of segments in your bar
segmentedProgressBar.setSegmentCount(7);
Upvotes: -2