1

With AsyncTask when processing array data we can easily deduce using AlertDialog progress bar processing.

Can this be done with the help of RxJava? I ask you a simple example.

And how to solve the problem of turning devaysa when downloading data from the server using RxJava and display progress AlertDialog?

Thank you!

SmallSani
  • 172
  • 4
  • 19

1 Answers1

1

The rx-alert-dialog library solves this.

For example:

new RxAlertDialog.Builder(this)
    .title("Title")
    .message("Some action is required")
    .positiveButton("OK")
    .negativeButton("NO")
    .neutralButton("LATER")
    .show()
    .subscribe(new Observer(){
    ...
    })

In theory, you could call setView() on an AlertDialog.Builder to set a custom View that shows progress. However, this is considered bad practice and ProgressDialog is a better alternative. This StackOverflow answer shows you how to use ProgressDialog.

Also relevant is the Material Design documentation about progress

Community
  • 1
  • 1
ByteWelder
  • 5,464
  • 1
  • 38
  • 45