Skip to content

razaghimahdi/Compose-Loading-Dots

Repository files navigation

Compose Loading Dots

A library which allows you to have some beautiful loading with dots by Jetpack Compose.

If you need this in XML then try Android-Loading-Dots.

Give a Star! ⭐

If you like or are using this project to learn or start your solution, please give it a star. Thanks!

Compose Loading Dots

Step 1. Add it in your project-level build.gradle or settings.gradle file:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.razaghimahdi:Compose-Loading-Dots:1.2.3'
} 

Step 3. How to use

val rememberDotsLoadingWavyController = rememberDotsLoadingController()
val rememberDotsLoadingFadyController = rememberDotsLoadingController()
val rememberDotsLoadingBiggyController = rememberDotsLoadingController()
val rememberLoadingScalyController = rememberDotsLoadingController()
val rememberLoadingDancingController = rememberDotsLoadingController()
val rememberLoadingCircleFadyController = rememberDotsLoadingController()


LoadingWavy(controller = rememberDotsLoadingWavyController)

LoadingFady(controller = rememberDotsLoadingFadyController)

LoadingBiggy(controller = rememberDotsLoadingBiggyController)

LoadingScaly(controller = rememberLoadingScalyController)

LoadingDancing(controller = rememberLoadingDancingController)

LoadingCircleFady(controller = rememberLoadingCircleFadyController)

Step 4. How to initial

val rememberDotsLoadingWavyController = rememberDotsLoadingController()
LoadingWavy(
    controller = rememberDotsLoadingWavyController,
    modifier = Modifier.padding(vertical = 8.dp),
    dotsCount = 3,
    dotsColor = Color.Red,
    dotsSize = 25.dp,
    duration = 300,
    easing = LinearEasing
)

OR

val rememberDotsLoadingWavyController = rememberDotsLoadingController()
rememberDotsLoadingWavyController.updateSelectedDotsCount(3)
rememberDotsLoadingWavyController.updateSelectedDotsDuration(300)
rememberDotsLoadingWavyController.updateSelectedEasing(LinearEasing)
rememberDotsLoadingWavyController.updateSelectedDotsColor(Color.Red)
rememberDotsLoadingWavyController.updateSelectedDotsSize(25.dp)

LoadingWavy(controller = rememberDotsLoadingWavyController)
record.mp4

Developed by Mahdi Razzaghi Ghaleh