Android的控件以及属性(TextView,Button)1:TextView  主要在界⾯上显⽰⼀段⽂字
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"  宽度
android:layout_height="wrap_content"  ⾼度
android:text="This is TextView"  设置⽂本信息
android:textColor  设置⽂本颜⾊
android:maxHeight设置⽂本区域的最⼤⾼度
  android:minHeight设置⽂本区域的最⼩⾼度
  android:textColorHighlight被选中⽂字的底⾊,默认为蓝⾊
2:Button 按钮。
android:id="@+id/loginButton"
android:layout_width="50dp    宽度,
android:layout_height="50dp"  ⾼度
android:layout_alignParentRight="true"  靠近⽗类的右边
android:layout_gravity="center"  相对于⽗类居中
android:text="Login"  ⽂本信息,也就是button上的⽂字
android:textSize="12dp"  字体⼤⼩
android:visibility="invisible"    不可见
Button继承⾃TextView,textView的属性在Button控件中都可以使⽤。
3:以下是全部属性,在Eclipse中对应的,查⽅便:
android:bufferType="" 指定getText()⽅式取得的⽂本类别。normal
android:text=""    ⽂本信息
android:hint=""    隐藏的。
android:textColor=""    字体的颜⾊
android:textColorHighlight=""    被选中⽂字的底⾊,默认是蓝⾊
android:textColorHint=""      设置提⽰信息⽂字的颜⾊,默认为灰⾊。与hint⼀起使⽤
android:textAppearance=""  设置⽂字外观
android:textSize=""            字体的⼤⼩,推荐度量单位”sp”,如”15sp”textstyle
android:textScaleX=""        设置⽂字之间间隔,默认为1.0f。
android:typeface=""            设置⽂本字体,必须是以下常量值之⼀:normal 0, sans 1, serif 2, monospace(等宽字体) 3]
android:textStyle=""            设置字形[bold(粗体) 0, italic(斜体) 1, bolditalic(⼜粗⼜斜) 2] 可以设置⼀个或多个,⽤“|”隔开
android:fontFamily=""
android:textColorLink=""    ⽂字链接的颜⾊
android:cursorVisible=""      设定光标为显⽰/隐藏,默认显⽰。如果设置false,即使选中了也不显⽰光标栏。
android:maxLines=""        设置⽂本的最⼤显⽰⾏数,超出部分⾃动换⾏,超出⾏数将不显⽰。
android:maxHeight=""      最⼤⾼度
android:lines=""                  设置⽂本的⾏数,设置两⾏就显⽰两⾏,即使第⼆⾏没有数据。
android:height=""              ⾼度
android:minLines=""        设置⽂本的最⼩⾏数,与lines有些类似,但是设置为2⾏即可以显⽰2⾏及以上。
android:minHeight=""            最⼩⾼度
android:gravity=""              这个是针对控件⾥的元素来说的,⽤来控制元素在该控件⾥的显⽰位置。例如,在⼀个Button按钮控件中设置如下
两个属性,android:gravity="left"和android:text="提交",这时Button上的⽂字“提交”将会位于Button的左部。
android:scrollHorizontally=""
android:password=""            为true,设置只能输⼊密码。
android:singleLine=""      设置单⾏显⽰。如果和layout_width⼀起使⽤,当⽂本不能全部显⽰时,后⾯⽤“…”来表⽰。
如android:text="test_ singleLine " android:singleLine="true"android:layout_width="20dp"将只显⽰“t…”。
如果不设置singleLine或者设置为false,⽂本将⾃动换⾏
android:enabled=""                  是否可以编辑,true可以编辑,false不可以编辑。
android:selectAllOnFocus=""
android:includeFontPadding=""
android:maxLength=""                      限制显⽰的⽂本长度(中⽂英⽂数字均占1个长度),超出部分不显⽰。
android:shadowColor=""                  指定⽂本阴影的颜⾊,需要与shadowRadius⼀起使⽤。
android:shadowDx=""                        设置阴影横向坐标开始位置。
android:shadowDy=""                      设置阴影纵向坐标开始位置。
android:shadowRadius=""                设置阴影的半径。设置为0.1就变成字体的颜⾊了,⼀般设置为3.0的效果⽐较好。
android:autoLink=""                            设置是否当⽂本为URL链接/email/电话号码/map时,⽂本显⽰为可点击的链接。可选值(none/web/email/phone/map/all)
android:linksClickable=""
android:numeric=""
android:digits=""
android:phoneNumber=""
android:inputMethod=""
android:capitalize=""
android:autoText=""                              如果设置,将⾃动执⾏输⼊值的拼写纠正。此处⽆效果,在显⽰输⼊法并输⼊的时候起作⽤。
android:editable=""                                设置是否可编辑。
android:freezesText=""                          设置保存⽂本的内容以及光标的位置。
android:ellipsize=""                                设置当⽂字过长时,该控件该如何显⽰。有如下值设置:”start”—-省略号显⽰在开头;”end” ——省略号显⽰在结尾;”middle”—-省略号显⽰在中间;”marquee” ——以跑马灯的⽅式显⽰(动画横向移动) ,只在单⾏有效,即设置singleLine="true"
android:drawableTop=""                              在text的正上⽅输出⼀个drawable。
android:drawableBottom=""                          在text的下⽅输出⼀个drawable,如果指定⼀个颜⾊的话会把text的背景设为该颜⾊,并且同时和                              background使⽤时覆盖后者。
android:drawableLeft=""                                  在text的左边显⽰⼀个drawable,
android:drawableRight=""                                在text的右边显⽰⼀个drawable,
android:drawableStart=""                                在text的开始显⽰⼀个drawable,
android:drawableEnd=""                                    在text的结束显⽰⼀个drawable,
android:drawablePadding=""
android:lineSpacingExtra=""                              设置⾏间距。
android:lineSpacingMultiplier=""                        设置⾏间距的倍数。如”1.2”
android:marqueeRepeatLimit=""
android:inputType=""
android:imeOptions=""
android:privateImeOptions=""
android:imeActionLabel=""                            设置IME动作标签        android:imeActionId=""                                    设置IME动作ID        android:editorExtras=""
android:textSelectHandleLeft=""
android:textSelectHandleRight=""
android:textSelectHandle=""
android:textEditPasteWindowLayout=""
android:textEditNoPasteWindowLayout=""
android:textEditSidePasteWindowLayout=""
android:textEditSideNoPasteWindowLayout=""
android:textEditSuggestionItemLayout=""
android:textCursorDrawable=""
android:textIsSelectable=""
android:textAllCaps=""
android:id=""
android:tag=""
android:scrollX=""