Fix button re-enabling: it has to be done from the UI thread.

This commit is contained in:
Xavi Artigas 2012-10-10 11:32:26 +02:00
parent 58a597aa20
commit 108d3a1ffb

View file

@ -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 {