Need help with AlginProject?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Amterson
297 Stars 46 Forks MIT License 16 Commits 5 Opened issues

Description

模仿微信读书左右对齐的文字效果

Services available

!
?

Need anything else?

Contributors list

# 202,184
Java
Android
gravity
16 commits

1.非中文单词不够一行会自动截断,用符号“-”连接起来;

2.适配布局的方向,使用原生TextView的属性:android:gravity=""和android:textAlignment="",gravity的优先级较高,如果同时设置这两个属性则以textAlignment的属性为准;


3.英文情况下使用元音字母进行截断,如果没有找到元音字母则使用默认规则截断;

4.依赖Library

在主项目app的build.gradle中依赖

dependencies {
    ...
    implementation 'com.text:alginlib:1.0.1'
}

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.