Skip to content

One TextView with Two types of Alignment 一个Textview根据行数不同实现不同的对齐方式

Notifications You must be signed in to change notification settings

AfterChristmas/TwoTypesAlignmentTextView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

TwoTypesAlignmentTextView

One TextView with Two types of Alignment 一个Textview根据行数不同实现不同的对齐方式

使用方法

<TextView
    android:id="@+id/info_title"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="16dp"
    android:text="商品说明:"
    android:textColor="@color/shallow_black"
    android:textSize="13sp" />

<TwoTypesAlignmentTextView
    android:id="@+id/info_detail"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="20dp"
    android:layout_marginRight="16dp"
    android:layout_toRightOf="@+id/info_title"
    android:text="此商品非实体此商品非实体此商品非实体此商品非实体此商品非实体"
    android:textColor="@color/person_copyright_color"
    android:textSize="13sp" />

效果图

效果示例

About

One TextView with Two types of Alignment 一个Textview根据行数不同实现不同的对齐方式

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages