java: run it on UiThread

This commit is contained in:
rafal1137 2021-04-10 16:48:33 +02:00
parent 1e8f17937a
commit fffd4a2b11

View file

@ -330,6 +330,9 @@ public class ETLActivity extends SDLActivity implements JoyStickListener {
if (isAndroidTV() || isChromebook()) {
Log.v("ETL", "AndroidTV / ChromeBook Detected, Display UI Disabled!");
} else {
runOnUiThread(new Runnable() {
@Override
public void run() {
final ImageButton buttonPopUpMenu = new ImageButton(getApplicationContext());
buttonPopUpMenu.setImageResource(R.drawable.ic_one_line);
buttonPopUpMenu.setBackgroundResource(0);
@ -408,6 +411,8 @@ public class ETLActivity extends SDLActivity implements JoyStickListener {
mLayout.addView(esc_btn, lp2);
runUI();
}
});
}