Android Sweet Alert

Published by Kapil Mohan on

SWAL implementation for android

Inspired by JavaScript SweetAlert

GitHub link: https://github.com/pedant/sweet-alert-dialog

Android sweet alert - appsnipp

Usage

show material progress

You can customize progress bar dynamically with materialish-progress methods via SweetAlertDialog.getProgressHelper():

  • resetCount()
  • isSpinning()
  • spin()
  • stopSpinning()
  • getProgress()
  • setProgress(float progress)
  • setInstantProgress(float progress)
  • getCircleRadius()
  • setCircleRadius(int circleRadius)
  • getBarWidth()
  • setBarWidth(int barWidth)
  • getBarColor()
  • setBarColor(int barColor)
  • getRimWidth()
  • setRimWidth(int rimWidth)
  • getRimColor()
  • setRimColor(int rimColor)
  • getSpinSpeed()
  • setSpinSpeed(float spinSpeed)

thanks to the project materialish-progress and @croccio participation.

more usages about progress, please see the sample.

Commonly Used

A success message:

A error message:

Others:

A basic message:

A title with a text under:

A warning message:

A message with a custom icon:

Bind the listener to confirm button:

Show the cancel button and bind listener to it:

Change the dialog style upon confirming:

Library Details:


Kapil Mohan

Like to add color to developers life and apps. Can create smile using Android, iOS, PHP, codeignitor, web technologies, etc... Feel free to contact me at [email protected] .