Added in API level 1
Deprecated in API level 17

TwoLineListItem


open class TwoLineListItem : RelativeLayout
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.RelativeLayout
   ↳ android.widget.TwoLineListItem

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
Public constructors

TwoLineListItem(context: Context!, attrs: AttributeSet!)

TwoLineListItem(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

TwoLineListItem(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods
open CharSequence!

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

open TextView!

Returns a handle to the item with ID text1.

open TextView!

Returns a handle to the item with ID text2.

Protected methods
open Unit

Finalize inflating a view from XML.

Inherited functions
Inherited properties

XML attributes

android:mode

android:mode

Public constructors

TwoLineListItem

Added in API level 1
TwoLineListItem(context: Context!)

TwoLineListItem

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

TwoLineListItem

Added in API level 1
TwoLineListItem(
    context: Context!,
    attrs: AttributeSet!,
    defStyleAttr: Int)

TwoLineListItem

Added in API level 21
TwoLineListItem(
    context: Context!,
    attrs: AttributeSet!,
    defStyleAttr: Int,
    defStyleRes: Int)

Public methods

getAccessibilityClassName

Added in API level 23
Deprecated in API level 17
open fun getAccessibilityClassName(): CharSequence!

Deprecated: Deprecated in Java.

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.

getText1

Added in API level 1
open fun getText1(): TextView!

Deprecated: Deprecated in Java.

Returns a handle to the item with ID text1.

Return
TextView! A handle to the item with ID text1.

getText2

Added in API level 1
open fun getText2(): TextView!

Deprecated: Deprecated in Java.

Returns a handle to the item with ID text2.

Return
TextView! A handle to the item with ID text2.

Protected methods

onFinishInflate

Added in API level 1
protected open fun onFinishInflate(): Unit

Deprecated: Deprecated in Java.

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.