mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 18:51:11 +00:00
Fix button re-enabling: it has to be done from the UI thread.
This commit is contained in:
parent
58a597aa20
commit
108d3a1ffb
1 changed files with 7 additions and 2 deletions
|
@ -105,8 +105,13 @@ public class Tutorial2 extends Activity {
|
|||
}
|
||||
|
||||
// Re-enable buttons, now that GStreamer is initialized
|
||||
this.findViewById(R.id.button_play).setEnabled(true);
|
||||
this.findViewById(R.id.button_stop).setEnabled(true);
|
||||
final Activity activity = this;
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
activity.findViewById(R.id.button_play).setEnabled(true);
|
||||
activity.findViewById(R.id.button_stop).setEnabled(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static {
|
||||
|
|
Loading…
Reference in a new issue