public class

SubtextItem

extends TextItem
java.lang.Object
   ↳ greendroid.widget.item.Item
     ↳ greendroid.widget.item.TextItem
       ↳ greendroid.widget.item.SubtextItem

Class Overview

A SubtextItem is really similar to a SubtitleItem as it displays two pieces of text. The only difference between those two items are the number of lines occupied by the content.

  • SubtextItem: subtext is displayed on several lines
  • SubtitleItem: subtitle is displayed on a single line

A SubtextItem may generally used to display a description text. As a result, it is disabled by default

Summary

Fields
public String subtext The string that will be displayed above the title of the item (possibly on several lines).
[Expand]
Inherited Fields
From class greendroid.widget.item.TextItem
From class greendroid.widget.item.Item
Public Constructors
SubtextItem(String text, String subtext)
Constructs a new SubtextItem
Public Methods
void inflate(Resources r, XmlPullParser parser, AttributeSet attrs)
Inflate this Item from an XML resource.
ItemView newView(Context context, ViewGroup parent)
Return a view that is associated to the current item.
[Expand]
Inherited Methods
From class greendroid.widget.item.TextItem
From class greendroid.widget.item.Item
From class java.lang.Object

Fields

public String subtext

The string that will be displayed above the title of the item (possibly on several lines).

Public Constructors

public SubtextItem (String text, String subtext)

Constructs a new SubtextItem

Parameters
text The main text for this item
subtext The subtext

Public Methods

public void inflate (Resources r, XmlPullParser parser, AttributeSet attrs)

Inflate this Item from an XML resource.

public ItemView newView (Context context, ViewGroup parent)

Return a view that is associated to the current item. The returned view is normally capable of being a good recipient for all item's information.

Parameters
context The Context in which the ItemView will be used
parent The parent View of that new View. The parent is usually the parent ListView and may be used to retrieve the correct LayoutParams type.
Returns
  • A new allocated view for the current Item