PowerText

Additional

Language
Java
Version
1.0.0 (Jun 12, 2019)
Created
Dec 10, 2017
Updated
Jun 11, 2019 (Retired)
Owner
Joe (lovejjfg)
Contributor
Joe (lovejjfg)
1
Activity
Badge
Generate
Download
Source code

PowerText

Handle TextView with Label and click to show full lines.

快速使用

layout:

<com.lovejjfg.powertext.ExpandableTextView
    android:id="@+id/text"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="20dp"
    android:lineSpacingExtra="10dp"
    android:textColor="#333"
    android:textSize="16sp"
    app:defaultLineCount="3"
    app:defaultMoreHint="查看更多"
    app:labelMargin="5dp"
    app:labelPaddingHorizontal="8dp"
    app:labelPaddingVertical="10dp"
    app:labelStrokeRadius="4dp"
    app:labelTextColor="#333"
    app:labelTextSize="12sp"
    app:moreHintColor="#f00"
    />

<com.lovejjfg.powertext.LabelTextView
    android:id="@+id/tvLabel"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_margin="20dp"
    android:lineSpacingExtra="10dp"
    android:textColor="#333"
    android:textSize="16sp"
    app:labelFillColor="true"
    app:labelMargin="10dp"
    app:labelPaddingHorizontal="4dp"
    app:labelPaddingVertical="6dp"
    app:labelStrokeColor="@color/colorAccent"
    app:labelStrokeWidth="1dp"
    app:labelTextColor="#fff"
    app:labelTextSize="12sp"
    />

code:

    text.setLabelText("奶茶妹妹")
    text.setOriginalText(originalText)

更新记录

详见 Release