Skip to content

DaaniDev/status-viewer

Repository files navigation

StatusViewer Library

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.

Features

  • 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.

Demo

Screen_recording_20240807_225518.mp4

Installation

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
)

Getting Callback

```ruby
StatusViewer(
 modifier = Modifier
  .fillMaxWidth()
  .height(300.dp),
 imagesList = list,
 progressColor = Color.Red
){
  // handle on click here
}

Developed By

Muhammad Danish Muhammad Danish

Medium
LinkedIn

TODO

  • Implement Image Loading from URL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages