setloadingstatus: check if all views exist

This commit is contained in:
Andrew Dolgov 2014-10-31 09:41:53 +03:00
parent 0a3a533844
commit aaed022731

View File

@ -1202,7 +1202,11 @@ public class OnlineActivity extends CommonActivity {
tv.setText(status);
}
findViewById(R.id.loading_container).setVisibility(status == R.string.blank ? View.GONE : View.VISIBLE);
View loadingContainer = findViewById(R.id.loading_container);
if (loadingContainer != null) {
loadingContainer.setVisibility(status == R.string.blank ? View.GONE : View.VISIBLE);
}
setProgressBarIndeterminateVisibility(showProgress);
}