Android Fragmented Knowledge point finishing
Why Android Update attempt must be done in the main thread?
This is because The view components in the Android system are not thread-safe. Typically, the main thread should be responsible for creating, displaying, and updating the UI, starting the child threads, and stopping the child threads. Let the child thread complete the calculation and issue the update UI message to the main thread , allowing the main thread to update the UI. This has prompted the Handler mechanism in Android .
How to change What version of the API is used by Android Studio compilation ?
Changes to the Android API compilation version via the flavors tab of the module setting;
Xiaomi phone after changing the app icon, does the desktop label change?
The problem can be solved after restarting;
Why doesn't the EditText cursor appear?
first set the Cursorvisible property to true, and then set the textcursordrawable (The background color is not the same as the background color of the control),the textcursordrawable property is the attribute that was introduced in API11 ;
How does the android:listselector property of the ListView work?
AResolve why it is invalid;B, find alternative methods: First, in your own implementation of theAdapterof theGetView ()method, as set:if (position = = SelectItem) {convertview.setbackgroundcolor (color.red); } else {convertview.setbackgroundcolor (color.transparent); } then, inOnitemclick ()method, make the following settings:Adapter.setselecteditem (position) adapter.notifydatasetinvalidated ();
B
How to TextView Some text for a specific style setting?
want toTextViewpart of the text to be styled, you need to use theSpannablestringbuilderclass, which provides aSetspan (Object what, int start, int end,int flags)method, where the Whatcan be an instance of the following class:Urlspan;Clickablespan;Backgroundcolorspan;Foregroundcolorspan;Maskfilterspan;Absolutesizespan;Relativesizespan;Imagespan;Scalexspan;Stylespan;Subscriptspan;Superscriptspan;Textappearancespan;Typefacespan;Rasterizerspan;Strikethroughspan;Underlinespan; How to use:a, GetSpannablestringbuilderinstances of the class:Builder;b, GetSpaninstances of subclasses, such asForegroundcolorspaninstances ofForgroundcolorspan;C, callSetspanmethod that specifies the starting position of the style decoration to be used for parameter padding;D, callTextViewof theSetText (spannablestringbuilder builder)method;
How to solve the Chinese garbled problem in Mac version Eclipse import Android project?
1. Find Text File Encoding in Preference,select other, enter GBK manually You can 2, select the garbled file, right-click the property, in the Text file Encoding to modify (this is for a single file modification method), for all *.java file that can be used in Eclipse preferences general->content type-> Text->java Source files->default Encoding in the settings.
Not to be continued
Android Fragmented Knowledge Point finishing