问题:
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
分享到:
相关推荐
<SeekBar android:id="@+id/seek" android:layout_width="300px" android:layout_height="wrap_content" android:max="100" android:progress="0" android:progressDrawable="@drawable/seekbar_img" //...
Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ...
Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ...
Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ...
Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ...
Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ...
The Practice of Project Management A Guide to the Business-Focused Approach Part I The Essential Building Blocks 1 Projects and project management 2 The context of project management Part II ...
Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ...
Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ...
As every C++ programmer knows, the language has many powerful features, but this power brings with it complexity, which in turn can make code more bug-prone and harder to read and maintain....
SINCE ITS INTRODUCTION IN THE FALL of 2008, Android has grown and matured to the point where it is currently the number one smartphone platform in terms of shipments worldwide. Along with that growth ...
The git-filter-branch command is enormously powerful and can do things that the BFG can't - but the BFG is much better for the tasks above, because: Faster : 10 - 720x faster Simpler : The BFG isn't...
We decided to write a book that focused not just on the needs of the MySQL appli- cation developer but also on the rigorous demands of the MySQL administrator, who needs to keep the system up and ...
paper while useful in the first edition no longer makes a great deal of sense This is doubly true because CSS support has advanced so far in the last few years that whatever bugs remain are difficult ...
The document is mostly focused on the Android operating system, but some of the techniques are also applicable to Linux systems. The focus of the techniques presented in this document is the ...
* ID of the active pointer. This is used to retain consistency during * drags/flings if multiple pointers are used. */ private int mActivePointerId = INVALID_POINTER; /** * Sentinel value ...
Glide:An image loading and caching library for Android focused on smooth scrolling Android-Universal-Image-Loader:Powerful and flexible library for loading, caching and displaying images on Android. ...
and this book is a methodical and thorough (for the layperson, at least) introduction to the field, with special focus on recognizing what he calls the six basic universally expressed emotions: ...
With that in mind, rather than focus on the latest release of OpenBSD, I'd like to share a resource which will help people who have an interest in OpenBSD get better acquainted with the operating ...