http://www.cnblogs.com/over140/archive/2010/09/02/1815439.html
Android2.2 API 中文文档系列(2) —— EditText
前言
关键字: Android API 中文,android sdk 中文,Android EditText 详解
声明
欢迎转载,但请保留文章原始出处:)
博客园:http://www.cnblogs.com
Android中文翻译组:http://androidbox.sinaapp.com/
正文
一、结构
java.lang.Object
android.view.View
android.widget.TextView
android.widget.EditText
已知直接子类:
AutoCompleteTextView, ExtractEditText
已知间接子类:
MultiAutoCompleteTextView
二、xml属性
| URL/email//map(none/web/email/phone/map/all)text | |
|
2 | |
| PC | |
| false | |
| 1234567890.+-*/%\n() | |
| textdrawableEditView | |
| textdrawabletextbackground | |
| textdrawable | |
| textdrawable()drawableLeftdrawableRightdrawableTopdrawableBottom | |
| textdrawable | |
| ,”start”—–”end”——”middle”—-”marquee” ——() | |
| center | |
| TexttextColorHint | |
| .................................................................... actionSearchactionSendactionNextactionDone flagNoExtractUiflagNoAccessoryActionflagNoEnterAction’|’ | |
| IMEID | |
| IME | |
| true | |
| com.google.android.inputmethod.pinyin | |
| nonetexttextCapCharacterstextCapWordstextCapSentencestextAutoCorrecttextAutoCompletetextMultiLinetextImeMultiLinetextNoSuggestionstextEmailAddresstextEmailSubjecttextShortMessage
textLongMessagetextPersonNametextPostalAddresstextPasswordtextVisiblePasswordtextWebEditTexttextFiltetextPhoneticnumberSignednumberDecimalphonedatetimedatetime | |
|
| |
| TextViewNTextView | |
| TextViewNemsems | |
| TextViewNemsems | |
| 55// | |
| widthlayout_width | |
| lines | |
| autoLink | |
| ”1.2” | |
| TextViewintegersigneddecimal | |
| ”.” | |
| () InputMethodService | |
| TextView | |
| shadowRadiusTextView | |
| 0.13.0 | |
| layout_width…t…singleLinefalse | |
| . | |
设置文字外观。如“?android:attr/textAppearanceLargeInverse textAppearanceButton/textAppearanceInverse/textAppearanceLarge/textAppearanceLargeInverse/textAppearanceMedium/textAppearanceMediumInverse/textAppearanceSmall/textAppearanceSmallInverse | |
| hint | |
| . | |
| 1.0fTextView | |
| ”sp””15sp” | |
| [bold() 0, italic() 2] | | |
| ) 3] | |
| px()/dp/sp/in/mm() | |
| px()/dp/sp/in/mm()layout_width | |
补充说明:
a). 由于是继承自TextView,所以属性是一样的,但是这里重点补充了输入法相关的属性说明和研究,部分注释也做了相应的调整。
b). Word格式下载
http://download.youkuaiyun.com/source/2664164
三、例子
3.1
结束
有朋友提议是否组织一下一起来翻译,这里我觉得可以这样:如果有兴趣,可以翻译好之后给我一个链接或者直接在我博客里面整理了发布出来,在此会补上翻译人以及原文地址,这样约束较低但是没有门槛,希望有志者热心参与,边翻译边等待完整版的中文API出来 :)
本文深入解析了Android2.2 API中的EditText组件,包括其结构、关键属性和使用示例,重点关注输入法相关属性及研究,提供丰富的XML属性说明。
361

被折叠的 条评论
为什么被折叠?



