Properties and Usage in button buttons for Android self-paced notes

Source: Internet
Author: User
Value under the String.xml storage resources, the name of the button is stored in the string.xml.
The text of all controls is best not to be written directly in XML, but rather to write the string in a certain format in Res\values\strings.xml, and then use the string ID reference in the XML.
For example:
Edit in Strings.xml First
<string name= "Button_name" > Login </string>;
And in the Activity_main.xml.
android:text= "@string/button_name" to access the "login" string.


String in value holds some strings, resources, etc.
The ID of the R file generation resource
button and Smallbutton no difference, is the size of the problem, in the Smallbutton more than one attribute:
Style= "? Android:attr/buttonstylesmall

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Properties and Usage in button buttons for Android self-paced notes

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.