我的家園

          我的家園

          問題:

          Android: couldn't save which view has focus because the focused view ### has no id



          可能引起原因有兩種,對應解決方法如下:

          解決方案一:

          <application

                  android:icon="@drawable/icon" android:label="@string/app_name" >

                  <activity

                      android:label="@string/app_name"

                     android:configChanges="orientation|keyboardHidden|keyboard|screenLayout

                      android:name=".Main" >

                      <intent-filter >

                          <action android:name="android.intent.action.MAIN" />

                          <category android:name="android.intent.category.LAUNCHER" />

                      </intent-filter>

                  </activity>

              </application>


          解決方案二:

          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);
              _thread.setRunning(true);
              _thread.start();
            }
            else
            {
              _thread.setRunning(true);
              _thread.start();
            } 
          }

          This solved the problem for me, a thread’s start method cannot be called twice, so I had to reallocate…

          http://forums.pragprog.com/forums/138/topics/4085



          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 响水县| 桂阳县| 比如县| 台前县| 梅州市| 莲花县| 甘孜县| 武穴市| 巫山县| 城步| 涡阳县| 思南县| 荥经县| 赫章县| 大港区| 定州市| 上虞市| 金山区| 通城县| 青田县| 海盐县| 金秀| 温泉县| 贺州市| 驻马店市| 东山县| 民勤县| 光泽县| 湟中县| 仪陇县| 宿松县| 阳春市| 印江| 顺昌县| 洛隆县| 肇东市| 金门县| 六盘水市| 姚安县| 略阳县| 特克斯县|