ExpandableTextView

The ExpandableTextView can hold more text than fitting into the view’s area. The user can expand the view to read all text.

Examples

Setting the maximum collapsed lines
<ExpandableTextView maxCollapsedLines="5" text="#{aBindingToAVeryLongText}" />
Custom images for opening and closing icon
<ExpandableTextView expandImage="img/open.svg" collapseImage="img/close.svg"
    text="#{aBindingToAVeryLongText}" />

Children

An optional text element as replacement for the text attribute.

Attributes

Name Type Default Binding Description

Inherits all attributes from TextView and adds the following:

maxCollapsedLines

unsigned int

8

output

The maximum number of text lines allowed to be shown when the view gets collapsed.

animDuration

unsigned int

300

output

Duration of the animation for the expansion/collapse in milliseconds.

animAlphaStart

float

0.7

output

Alpha value of the TextView when the animation starts. Set this value to 1 if you want to disable the alpha animation.

expandImage

URI

output

Customize an image shown set as the ImageButton to expand the TextView.

collapseImage

URI

output

Customize an image shown set as the ImageButton to collapse the TextView.


Parts of this documentation are a derivate of the Android Developer Documentation by Google used under CC-BY-2.5.

results matching ""

    No results matching ""