Use view in an XML file on Android to draw a line above a control; Android:listselector's property description; android:visibility= "Gone"

Source: Internet
Author: User
Tags transparent color

First, for example relativelayout in android:visibility= "Gone"

It has three properties: visible display; invisible display black background bar; gone not displayed

In a class, you can set its display or not, setvisibility (View.gone);

Setvisibility (view.visible); display

Second, the attribute description of Android:listselector

<gridview
Android:id= "@+id/gridview_numberkeyboard"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
Android:layout_alignparentbottom= "true"
Android:layout_marginbottom= "0DP"
Android:background= "#efeff4"
android:gravity= "Center"
Android:horizontalspacing= "1DP"
Android:numcolumns= "3"
android:verticalspacing= "1DP" >
</GridView>

When you click on an item in the GridView as shown above, the orange display background (the Android system default color) is displayed.

If you want to set a colorless (transparent color, no system background color), and set their own click Effect, just set the above settings android:listselector= "@android: Color/transparent"

(iii) Use view to draw a line above a control in an XML file

<view
Android:id= "@+id/view_line"
Android:layout_width= "Match_parent"
android:layout_height= "1DP"//height of the line
android:layout_aligntop= "@id/gridview_numberkeyboard"//Line aligns with a control
android:background= "#efeff4" >
</View>

Use view in an XML file on Android to draw a line above a control; Android:listselector's property description; android:visibility= "Gone"

Related Article

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.