Android Layout notes

Source: Internet
Author: User

Control
Control TextView EditText Button ImageButton
Property *id Hint Text Src

*layout_width InputType


*layout_height ImageView


Text src= "@drawable/ic_"


TextColor background= "" Image/Color


Background



Singleline= "true" single line//marquee case



Monitor Button Events

1. Anonymous Inner class

2. External Classes

3. interface 6-4 //Not implemented Setonclicklistener (this)//this.onclick

V.setalpha (0.5f)//button transparency


Three-step realization of the Marquee lamp  Step1,Add three properties to a control
Ellipsize= "marquee" focusable= "true" focusableintuchmode= "true"//implements a one-line marquee layout_below= "@id/textview1"// Under the Textview1
Step2
Public MarqueeText extends textview{//construction method public MarqueeText (Context context,attributeset attrs,int defstyle) {    Super (Context,attrs,defstyle);    } public MarqueeText () {super (Context,attrs,defstyle);    } public MarqueeText (context Context,attributeset attrs) {super (context,attrs);    }//returns True to set scrolling @override public boolean isFocused () {return true; }}
Step3

Add this control to the layout <com.icngor.marqueetext .../>


Attached: Orientation Horizontal/Vertical


Android Layout 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.