Alter UI only on UI thread

This commit is contained in:
Aaron Culliney 2015-12-12 13:29:50 -08:00
parent b1b55006be
commit ac78e00afa

View File

@ -137,12 +137,17 @@ public class Apple2DisksMenu implements Apple2MenuView {
public static void firstTime(Apple2Activity activity) {
final ProgressBar bar = (ProgressBar) activity.findViewById(R.id.crash_progressBar);
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
try {
bar.setVisibility(View.VISIBLE);
bar.setIndeterminate(true);
} catch (NullPointerException npe) {
Log.v(TAG, "Whoa, avoided NPE in first time #1");
}
}
});
getDataDir(activity);