Android: couldn't save which view has focus because the focused view ### has no id
android:icon="@drawable/icon" android:label="@string/app_name" >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
What probably happened is that you created a thread in the surfaceCreated() method but didn’t stop it or get rid of it in the surfaceDestroy() method.
When you didn’t give a theme for the preferences, it took over the whole screen and your old surface was destroyed. But when you specified a dialog-like theme, the old surface was still there because it was visible underneath the preferences.
public void surfaceCreated(SurfaceHolder holder)
if (_thread == null || _thread.getState() == Thread.State.TERMINATED)
_thread = new TutorialThread(getHolder(), this);
This solved the problem for me, a thread’s start method cannot be called twice, so I had to reallocate…