A Jetpack Compose library for displaying a series of images with a configurable progress indicator. The indicator can be placed either at the top or bottom of the images. This library accept imagesList in the Int format like val list = listOf(R.drawable.image1) etc.
- Display a list of images in a horizontal pager.
- Automatically animate the progress of each image.
- Configurable progress indicator placement (top or bottom).
- Clickable images with customizable click actions.
Screen_recording_20240807_225518.mp4
Add the following in your settings.gradle of app module:
repositories {
maven(url = "https://jitpack.io")
}
then add the following to your build.gradle file:
dependencies {
implementation("com.github.DaaniDev:status-viewer:1.0.2")
}
##Usage
// By default Indicator Location is on Top
StatusViewer(
modifier = Modifier
.fillMaxWidth()
.height(300.dp),
imagesList = list,
progressColor = Color.Red
)
// If you want to show indicator at the bottom of the image then you can use
StatusViewer(
modifier = Modifier
.fillMaxWidth()
.height(300.dp),
imagesList = list,
progressColor = Color.Red,
indicatorLocationType = IndicatorLocationType.BOTTOM
)
// To create Statuses Like WhatsApp, Instagram or any social media app
StatusViewer(
modifier = Modifier
.fillMaxSize(),
imagesList = list,
progressColor = Color.Red,
indicatorLocationType = IndicatorLocationType.BOTTOM
)```ruby
StatusViewer(
modifier = Modifier
.fillMaxWidth()
.height(300.dp),
imagesList = list,
progressColor = Color.Red
){
// handle on click here
}|
|
Muhammad Danish Medium |
- Implement Image Loading from URL