android - 像在应用程序启动器中一样实现快捷文本格式

标签 android text android-launcher

我想将快捷方式文本的格式设置为与应用程序启动器中的快捷方式文本相同。太长的文本将被剪切,其尾部将逐渐消失。有没有人知道该怎么做?

enter image description here

非常感谢!

最佳答案

fadingEdge 添加到您的 TextView 定义

android:fadingEdge="horizontal"

但是,由于性能下降问题,此方法已被弃用,应仅在应用程序的视觉设计需要时使用。

要使用 API 级别 14 和更高级别请求衰落边缘,请使用

android:requiresFadingEdge 属性

参见 documentation

关于android - 像在应用程序启动器中一样实现快捷文本格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13715937/

相关文章:

android - 强制 android 使用方形启动器图标

java - 无法让 String.split() 在 android 上按预期工作

java - 如何将服务器设置为 "deploy"以便可以通过 Internet 访问它?

regex - Postgresql 正则表达式替换文本字段

iphone - NSString sizeWithFont : for multiple lines?

text - 注意力网络是如何运作的?

android - 状态栏和 YoutubeAndroidPlayerAPI

android - 无法将 Retrofit 生成的 RealmObject 复制到 Realm : IllegalArgumentException

android - 从 ics 中的库存启动器中删除指向我的应用程序的快捷方式

android - 检测android中主页按钮的点击事件(应用程序启动器图标)