Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shenbengit authored May 18, 2021
1 parent bb8aa16 commit 4c48043
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,19 @@ dependencies {
## 使用事例

```kotlin

// 创建自定义LoadingDialog
val loadingDialog = LoadingDialog.Builder(context, R.style.LoadingDialog)
.setCancelable(true)//[Dialog.setCancelable]
.setCanceledOnTouchOutside(true)//[Dialog.setCanceledOnTouchOutside]
.setHintText("加载中...")//设置显示的提示性文字内容
.showHintText(true)//是否显示提示性文字
.create()

//显示dialog
loadingDialog.show()
//隐藏dialog
loadingDialog.dismiss()//or loadingDialog.cancel()

//快速创建默认配置的LoadingDialog
val defaultLoadingDialog = LoadingDialog.createDefault(context)
```

0 comments on commit 4c48043

Please sign in to comment.