mirror of
https://github.com/etlegacy/etlegacy-android.git
synced 2024-11-10 06:52:06 +00:00
java: run it on UiThread
This commit is contained in:
parent
1e8f17937a
commit
fffd4a2b11
1 changed files with 77 additions and 72 deletions
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue