Android Chinese API (19) -- twolinelistitem

Source: Internet
Author: User

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!

Related Article

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.