Android: ProgressDialog.show() crashes with getApplicationContext
- by Felix
I can't seem to grasp why this is happening. This code:
mProgressDialog = ProgressDialog.show(this, "", getString(R.string.loading), true);
works just fine. However, this code:
mProgressDialog = ProgressDialog.show(getApplicationContext(), "", getString(R.string.loading), true);
throws the following exception:
W/WindowManager( 569):…