私有项目,密码、参数配置dialog
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.shenbengit:ConfigureDialog:Tag'
}
// 创建自定义LoadingDialog
val passwordDialog = PasswordDialog.builder(this) { "123" }
.setOnPasswordCorrectCallback(correct = {
//do something
}, wrong = {
//do something
false
})
.create()
val configureDialog = ConfigureDialog.builder(this)
.setOriginalIp("192.168.2.2")
.setOriginalPort(12)//default : ConfigureDialog.Builder.DEFAULT_PORT
.setOriginalPrisonId("123123")
.setOnConfigureCallback { ip, port, prisonId ->
//do something
}
.create()