Skip to content

Customizable Toast Library written with Android Jetpack Compose

Notifications You must be signed in to change notification settings

ayhanunal/android-composable-toast

Repository files navigation

API Android-Studio Language

Composable Toast

Customizable Toast Library written with Android Jetpack Compose

Success Toast Usage

SuccessComposableToast(
  message = "your transaction was successful", 
  duration = Toast.LENGTH_SHORT, 
  padding = PaddingValues(bottom = 8.dp), 
  contentAlignment = Alignment.BottomCenter
)

Error Toast Usage

ErrorComposableToast(
  message = "an unexpected error occurred", 
  duration = Toast.LENGTH_SHORT, 
  padding = PaddingValues(bottom = 8.dp), 
  contentAlignment = Alignment.BottomCenter
)

Parameters

  • message : information message
  • duration : How long the toast message will stay on the screen
  • padding : Padding for message box
  • contentAlignment : Specify in which position the toast message will appear on the screen