TwoLineListItem


public class TwoLineListItem
extends RelativeLayout

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.RelativeLayout
         ↳ android.widget.TwoLineListItem


This class was deprecated in API level 17.
This class can be implemented easily by apps using a RelativeLayout or a LinearLayout.

A view group with two children, intended for use in ListViews. This item has two TextViews elements (or subclasses) with the ID values text1 and text2. There is an optional third View element with the ID selectedIcon, which can be any View subclass (though it is typically a graphic View, such as ImageView) that can be displayed when a TwoLineListItem has focus. Android supplies a standard layout resource for TwoLineListView (which does not include a selected item icon), but you can design your own custom XML layout for this object.

Summary

XML attributes

android:mode  

Inherited XML attributes

Inherited constants

Inherited fields

Public constructors

TwoLineListItem(Context context)
TwoLineListItem(Context context, AttributeSet attrs)
TwoLineListItem(Context context, AttributeSet attrs, int defStyleAttr)
TwoLineListItem(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public methods

CharSequence getAccessibilityClassName()

Return the class name of this object to be used for accessibility purposes.

TextView getText1()

Returns a handle to the item with ID text1.

TextView getText2()

Returns a handle to the item with ID text2.

Protected methods

void onFinishInflate()

Finalize inflating a view from XML.

Inherited methods

XML attributes

android:mode

Public constructors

TwoLineListItem

Added in API level 1
public TwoLineListItem (Context context)

Parameters
context Context

TwoLineListItem

Added in API level 1
public TwoLineListItem (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

TwoLineListItem

Added in API level 1
public TwoLineListItem (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

TwoLineListItem

Added in API level 21
public TwoLineListItem (Context context, 
                AttributeSet attrs, 
                int defStyleAttr, 
                int defStyleRes)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

defStyleRes int

Public methods

getAccessibilityClassName

Added in API level 23
Deprecated in API level 17
public CharSequence getAccessibilityClassName ()

Return the class name of this object to be used for accessibility purposes. Subclasses should only override this if they are implementing something that should be seen as a completely new class of view when used by accessibility, unrelated to the class it is deriving from. This is used to fill in AccessibilityNodeInfo.setClassName.

Returns
CharSequence

getText1

Added in API level 1
public TextView getText1 ()

Returns a handle to the item with ID text1.

Returns
TextView A handle to the item with ID text1.

getText2

Added in API level 1
public TextView getText2 ()

Returns a handle to the item with ID text2.

Returns
TextView A handle to the item with ID text2.

Protected methods

onFinishInflate

Added in API level 1
protected void onFinishInflate ()

Finalize inflating a view from XML. This is called as the last phase of inflation, after all child views have been added.

Even if the subclass overrides onFinishInflate, they should always be sure to call the super method, so that we get called.
If you override this method you must call through to the superclass implementation.