mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +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
|
// Re-enable buttons, now that GStreamer is initialized
|
||||||
this.findViewById(R.id.button_play).setEnabled(true);
|
final Activity activity = this;
|
||||||
this.findViewById(R.id.button_stop).setEnabled(true);
|
runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
activity.findViewById(R.id.button_play).setEnabled(true);
|
||||||
|
activity.findViewById(R.id.button_stop).setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
Loading…
Reference in a new issue