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