Progress dialog not showing with koush / ion library
This is my code. The problem is that the progress dialog is not displayed, so the default text is displayed in the text view and after a while the content of the url is loaded into it. How can I fix this?
tv = (TextView) findViewById(R.id.textView1);
pd = new ProgressDialog(MainActivity.this);
Ion.with(getBaseContext()).load("https://google.com")
.progressDialog(pd)
.asString()
.setCallback(new FutureCallback() {
@Override
public void onCompleted(Exception arg0, String arg1) {
// TODO Auto-generated method stub
tv.setText(arg1);
}
});
+3
source to share
1 answer