小编E. *_*uku的帖子

如何使TextView具有渐弱的边缘?

我有一些一般的编程知识,但我是android开发的新手,我已经开始使用RecyclerView,我也使用cardview过.但在某些情况下,标题太长了,我只想添加一个渐弱的边缘.

我在这里搜索过,但找不到任何东西.所以我自己尝试了,但是我无法让它发挥作用.我也在外面使用它RecyclerView,但结果仍然相同.

我正在使用的代码.

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:text="Hello World"
    android:id="@+id/textView"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:textSize="25sp"
    android:textStyle="bold"
    android:fadingEdge="horizontal" <!-- I think those 2 lines should do it,
    android:fadingEdgeLength="40dp"/>
Run Code Online (Sandbox Code Playgroud)

我想在Play Store的这张图片中制作淡出的TextView:

图片

任何帮助,将不胜感激.提前致谢...

android textview android-recyclerview

9
推荐指数
1
解决办法
1万
查看次数

标签 统计

android ×1

android-recyclerview ×1

textview ×1