Albert Gao
Albert Gao

Reputation: 3773

How to make indeterminateProgressDialog in Anko non cancelable?

How to make indeterminateProgressDialog non cancellable? There is a isCancelable property for alert, but seems not the case for indeterminateProgressDialog, how to solve it?

Upvotes: 4

Views: 402

Answers (1)

dev.farmer
dev.farmer

Reputation: 2779

Try this:

indeterminateProgressDialog(R.string.wait_for_loading).apply {
    setCancelable(false)
}

Upvotes: 0

Related Questions