1, spinner can not be used in dialog and Tabhost solution.
2. Eclipse Associated JDK Source code
(1) "Window", "Preferences", "Java", "Installed JREs"
(2) At this time "installed JREs" to the right of the list pane, list the JRE environment in the system, select your JRE, and then click "Edit ..." on the edge, a window will appear (Edit JRE)
(3) Select this entry for the Rt.jar file: the "+" sign on the left of the "C:\Program Files\java\jre_1.5.0_06\lib\rt.jar" Point expands
(4) After expanding, you can see "source Attachment: (None)", point this item, point to the right button "Source Attachment ...", select the "src.zip" file under your JDK directory.
3. Unable to open sync connection! When reporting a mistake, please restart the USB debugging in the setup.
4, EditText set the cursor position problem
There are some pre-set text in the EditText, want to put the cursor to the front, the first is the use of setselection (0), the results found in Samsung P1000 above the problem. The study found that it was necessary to call Edittext.requestfocus () before calling SetSelection (0). Otherwise, there is a problem on the 2.x machine, but the 3.x is good.
5, the home key in Android is reserved by the system, can not be used as onkeydown as a fallback key. However, you can add your own processing code based on activity and view events that are triggered when the home key is pressed. Online Some people say can use Onattachwindow to intercept the home button.
6. When rendering with Surfaceview, if you want to have other view in it when needed, you can put Surfaceview and other view in layout, you can hide other view in normal time.
7. Use Android:imeoptinos to make some interface settings on the Android-powered soft keyboard:
android:imeoptions= "Flagnoextractui"//Make the soft keyboard not display full screen, only occupy a portion of the screen. This property also controls the display of keys in the lower right corner of the soft keyboard, which is the return key by default.
android:imeoptions= "Actionnone"//input box to the right without any hint
android:imeoptions= "Actiongo"//Bottom right button content is ' start '
android:imeoptions= "Actionsearch"//Bottom right button for magnifying glass image, search
android:imeoptions= "Actionsend"//lower right button content for ' send '
android:imeoptions= "Actionnext"//lower right button content for ' next '
android:imeoptions= "Actiondone"//Bottom right button content is ' done '
8. Add Shadow to TextView
<style name= "Overlay" >
<item name= "Android:paddingleft" >2dip </item>
<item name= "Android:paddingbottom" >2dip </item>
<item name= "Android:textcolor" > #ffffff </item>
<item name= "Android:textsize" >12SP </item>
<item name= "Android:shadowcolor" > #00ff00 </item>
<item name= "ANDROID:SHADOWDX" >5 </item>
<item name= "Android:shadowdy" >3 </item>
<item name= "Android:shadowradius" >6 </item>
</style>
<textview android:id= "@+id/test"
Android:layout_width= "Fill_parent"
android:layout_height= "Wrap_content"
style= "@style/<span style=" Font-family:helvetica,tahoma, Arial, Sans-serif; ">overlay </span>"
android:text= "Test"
android:gravity= "Center"/>
9. How to set the Chinese in TextView to bold:
Use the android:textstyle= "bold" in the XML file to set the English to bold, but you cannot set the Chinese to bold, and the Chinese to be bold in the following way:
TextView TV = (TextView) Findviewbyid (R.ID.TEXTVIEW01);
Textpaint TP = Tv.getpaint ();
Tp.setfakeboldtext (TRUE);
Small experience Summary of Android development (next)