Getting Started with Android

Source: Internet
Author: User

TextView:

Android:id--The control's idandroid:layout_width--the width of the control android:layout_height--the height of the control android:text--text content android:textsize-- Text Size Android:textcolor--Text color Android:background--control background
EdittexT added:
Android:hint--Input display text Android:inputtype--Input text type

Wrap_content: Wrapping Century text content match_parent: The current control fills the property after the parent container--2.3api fill_parent: The current control fills the property before the parent class container--2.3API

ImageView
A control that displays a picture;
ImageView Properties:
1:android:src= "@drawable/ic_launcher"--->imageview content image 2:android:background= "@drawable/ic_launcher"---> ImageView background Image 3:ardroid:background= "#00ff00"  ---RGB color of >imageview

button and ImageButton features: 1. Shared features  can be used as a button to generate click events 2. Different points:  1>button has the Text property, ImageButton no  2 >imagebutton has src attribute, Buttong no
Note: Adding background and SRC to ImageButton adds a text image==== equivalent to text.
3. Create a noticeable click effect
button and ImageButton---listener events
Both button and ImageButton have an onclick event;
All controls have an OnClick event
A centralized method for monitoring event implementations: 1. Implementation of anonymous internal classes 2. Implementation of a standalone Class 3. Implement the interface in a way that implements


Getting Started with Android

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.