Android5.0 in TextView layout settings and 5.0 previous conflicts

Source: Internet
Author: User

<span style= "font-family: ' Hiragino Sans GB ', ' Microsoft Yahei ', Microsoft Jas Black, Tahoma, Arial, SimSun, Arial; Background-color:rgb (255, 255, 255); " > Same layout file, Android5.0 below can be displayed </span>


And Android5.0 can't display words.


Layout file:

<linearlayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width= "Match_parent" android:layout_height= "match_parent" android:orientation= "vertical" > <view android:layout_width= "fill_p Arent "android:layout_height=" 1px "android:layout_margintop=" 14DP "android:background=" @color/abc_sea Rch_url_text_pressed "/> <relativelayout android:id=" @+id/lay_coupons "android:layout_width=" Fill_pa Rent "android:layout_height=" wrap_content "android:layout_marginbottom=" 14DP "android:visibility=" Vis            Ible "> <textview android:id=" @+id/tv_coupons "android:layout_width=" Fill_parent " android:layout_height= "Wrap_content" android:layout_margin= "12DP" android:drawablepadding= "10DP            "Android:drawableright=" @android:d rawable/checkbox_off_background "android:gravity=" right "   android:text= "1"/>     <textview android:layout_width= "wrap_content" android:layout_height= "Wrap_content" Android:layout_marginbottom= "12DP" android:layout_marginleft= "16DP" android:layout_marginright= "10 DP "android:layout_margintop=" 12DP "android:layout_toleftof=" @id/tv_coupons "Android:text = "My Collection" android:textcolor= "@color/abc_search_url_text_holo" android:textsize= "16sp"/> </rel ativelayout> <view android:layout_width= "fill_parent" android:layout_height= "1px" Android:la yout_below= "@id/tv_coupons" android:background= "@color/abc_search_url_text_selected"/></linearlayout>


This is the problem I wrote before the layout is not standardized, the right of the TextView is set to the 5.0 will not be displayed before, and in 5.0 when the system defaults to the right of the text extrusion layout so 5.0 the layout does not display the text on the left, the layout of the following changes:

<linearlayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width= "Match_parent" android:layout_height= "match_parent" android:orientation= "vertical" > <view android:layout_width= "fill_p Arent "android:layout_height=" 1px "android:layout_margintop=" 14DP "android:background=" @color/abc_sea Rch_url_text_pressed "/> <relativelayout android:id=" @+id/lay_coupons "android:layout_width=" Fill_pa Rent "android:layout_height=" wrap_content "android:layout_marginbottom=" 14DP "android:visibility=" Vis            Ible "> <textview android:id=" @+id/tv_coupons "android:layout_width=" Wrap_content " android:layout_height= "Wrap_content" android:layout_alignparentright= "true" Android:layout_mar Gin= "12DP" android:drawablepadding= "10DP" android:drawableright= "@android:d rawable/checkbox_off_back Ground "android:gRavity= "Right" android:text= "1"/> <textview android:layout_width= "Wrap_content" android:layout_height= "Wrap_content" android:layout_marginbottom= "12DP" Android:layout_marginle ft= "16DP" android:layout_marginright= "10DP" android:layout_margintop= "12DP" android:layou T_alignparentleft= "true" android:layout_toleftof= "@id/tv_coupons" android:text= "My Favorites" and Roid:textcolor= "@color/abc_search_url_text_holo" android:textsize= "16sp"/> </RelativeLayout> &lt ; View android:layout_width= "fill_parent" android:layout_height= "1px" android:layout_below= "@id/tv_coup ONS "android:background=" @color/abc_search_url_text_selected "/></linearlayout>


Android5.0 in TextView layout settings and 5.0 previous conflicts

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.