Skip to content

younhwan97/SimpleLoading

Repository files navigation

SimpleLoading


API


💡 This library provide a simple loading dialog for Jetpack Compose.

Download

jipack

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
    implementation 'com.github.younhwan97:SimpleLoading:0.0.6'
}

Usage

You can implement Loading Dialog with SimpleLoading composable function as seen in the below:

val state = remember { mutableStateOf(true) }

SimpleLoading(
    openDialogCustom = state
)

You can change the color of the dialog using the color parameter.

val state = remember {
    mutableStateOf(false)
}

SimpleLoading(
    openDialogCustom = state,
    color = Color.Black
)

If you want to hide the close button, pass false to the clickableClose parameter as seen in the below:

val state = remember {
    mutableStateOf(false)
}

SimpleLoading(
    openDialogCustom = state,
    color = Color.Black,
    clickableClose = false
)