Preface
This chapter is about Android. widget. twolinelistitem. The translation is from loveshirui. This article provides complete and sample code. You are welcome to visit his blog: http://heji.javaeye.com/. thank loveshirui again! I look forward to your participation in Android API Chinese translation, contact me over140@gmail.com.
Statement
You are welcome to repost, but please keep the original source of the article :)
Loveshirui: http://heji.javaeye.com/
Blog: http://www.cnblogs.com
Farmer's uncle: http://www.cnblogs.com/over140/
Version
Android 2.2 r1
Body
I. Structure
Public class twolinelistitem extends relativelayout
Java. Lang. Object
Android. View. View
Android. View. viewgroup
Android. widget. relativelayout
Android. widget. twolinelistitem
Ii. Overview
This layout is used in listview and has two subviews. Each item has two textview elements whose ID values are text1 and text2. There is also an ID that is the selecteicon element, which can be a subclass of any view (the most typical is imageview ). Standard Layout resource files (excluding the selected icons) are supported, but you can customize XML layout files for this object.
Iii. xml attributes
Attribute name |
Description |
Android: Mode |
Layout mode: one line of oneline is collapsing and twoline is folded. |
Iv. Public Methods
Public textview gettext1 ()
Returns the textview object with the ID of text1.
Return Value
Textview
Public textview gettext2 ()
Returns the textview object with the ID of text1.
Return Value
Textview
5. Protected Methods
Protected void onfinishinflate ()
Initialize the XML layout.
6. Download
6.1 sample code
/Files/over140/2010/10/testtwolinelistitem.rar
6.2 PDF download
Http://download.csdn.net/source/2784480
End
This has never been used. I will try again to thank loveshirui for sharing it with you!