Andrews nice pop-up prompt (Dialog) - Sweet Alert Dialog

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_40176716/article/details/84647131

I had intended not to write this demo, as had previously made a similar, but now it seems there is no logic

Re-write this as a demo display and use of Sweet Alert Dialog

Sweet Alert Dialog github address

The first step: download the compressed package on github, new projects in the AS,

 

 

Step two: AS the upper left corner File-> New-> Import Module, select the downloaded zip in the Library

The third step :( This step some are automatically imported, please disregard) Set Library, import module

Step 4: File - Project Structure - app + Dependencies in

You can select SweetAlertDialog

Step Five: Remove the red box contents

Step Six: Change the red box contents

The first change to build.gradle app in compileSdkVersion

The second change is minSdkVersion

The third change is the implementation compile

 

Step Seven: Change the manifest file AndroidManifest.xml

tools:replace="android:icon,android:theme,android:allowBackup,android:label,android:supportsRtl"

Step eight: write code based on SweetAlertDialog of Usage

Basically like this
Basically like this

Code on GitHub great detail, it is worth mentioning that,

I encountered a bug in the fourth step I need to be solved, if you have encountered, please leave a message and I will then write

 

Guess you like

Origin blog.csdn.net/qq_40176716/article/details/84647131