Android Settings button is transparent

Source: Internet
Author: User

Set a button to be transparent,

(1) Modify the configuration file
<Button Android:id="@+id/btnappmore"Android:layout_width="wrap_content"Android:layout_height="wrap_content"Android:text="More info >>"Android:layout_alignparentright="true"Android:layout_marginleft="150DP"Android:background="@android: Color/transparent"/>

When the transparency button is set, the Find button is missing.

(2) Note that the button default color is the same as the phone background color (black), the text of the button is also black, here, we can use the activity of the OnCreate () to set the font color of the button:

btn=(Button) Findviewbyid (R.id.btnappmore); Btn.settextcolor (color.white);

In fact, transparency can also be done through Java, Gaga, Btn.setbackgroundcolor (color.transparent);

Android Settings button is transparent

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.