Android Fragmented Knowledge Point finishing

Source: Internet
Author: User

Why does the Android Update attempt must be done in the main thread?

android system The view components in are not thread-safe. The main thread should normally be responsible for creating, displaying, and updating ui , start the child thread, stop the child thread. Let the child thread complete the calculation and issue an update to the main thread, ui ui android handler mechanism.

How do I change the API version 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?

A,Resolve 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 do I make certain style settings for some of the text in TextView?

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.InPreferencefound inText File Encoding, select Other, manually enterGBKcan be2, Select garbled files, right-click Properties,Text File Encoding(This is a modified method for a single file), for all*.javafiles that can be used inEclipsePreferences in thegeneral->content Type->text->java Source files->default Encodingto set it in.

Not to be continued


Android Fragmented Knowledge Point finishing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.