Ruoshi Li

Results 13 comments of Ruoshi Li

Does this work for you? ```kt alert { isCancelable = false // your code ... } ```

I assume that you are referring to the [AlertBuilder](https://github.com/Kotlin/anko/blob/master/anko/library/static/commons/src/main/java/dialogs/AlertBuilder.kt) class since `AlertDialogBuilder` is deprecated. For [AlertBuilder](https://github.com/Kotlin/anko/blob/master/anko/library/static/commons/src/main/java/dialogs/AlertBuilder.kt), the `yesButton` and `noButton` are nothing but simple extension methods on top of `positiveButton`...

Something like this: ```kt alert { positiveButton("YES!!!", {}) negativeButton("NOPE!!!, {}) // something else ... } ``` And you can use `resource id` instead of literal string.

it is impossible since the type of dialog is `AlertBuilder` which does not have a `dismiss` method. I have an *ulgry* solution like this: ```kt var dialog: DialogInterface? = null...

Please make sure you call `await()` inside a `coroutine`, because it needs to suspend until the computation finishes, and only coroutines can suspend in a non-blocking way. As a matter...

Did you grant sufficient permissions to your app? `makeCall` just starts an activity with `Intent.ACTION_CALL` which needs `android.permission.CALL_PHONE`. Here is the [code](https://github.com/Kotlin/anko/blob/rr/0.10.8/anko/library/static/commons/src/main/java/Intents.kt#L216): ```kt fun Context.makeCall(number: String): Boolean { try {...

Well, `contracts` is a new feature in Kotlin 1.3 and `Anko` just migrated to Kotlin 1.3 in about 1 month ago. if you really want this feature, please send your...

hi @mostifa , I think @Tobibur 's code works. Could you please confirm and close this issue? Thank you.

I don't think `Anko` can do it since the [AlertDialog.Builder](https://developer.android.com/reference/android/app/AlertDialog.Builder) class in Android SDK does not expose such function. You need to customize the view all by yourself.

I think it should work, unless the user refuses to grant your app `WRITE_EXTERNAL_STORAGE` permission.