队的TextView褪色边缘 [英] Force fading edge on TextView
本文介绍了队的TextView褪色边缘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我里面的FrameLayout TextView的,我想画的FrameLayout衰落边缘过的TextView表明,文本可垂直扩展。
如何画褪色的FrameLayout的捧杯?
布局片段:
<的FrameLayout
机器人:layout_width =FILL_PARENT
机器人:layout_height =@扪/ list_item_collapsed
>
<的TextView
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
/>
< /&的FrameLayout GT;
解决方案
添加fadingEdge和fadingEdgeLength属性,你的TextView定义
<的TextView
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
机器人:fadingEdge =垂直
机器人:fadingEdgeLength =@扪/ fadelength
/>
提示:尽量避免使用必要,一般不要求他们框架布局
I have TextView inside FrameLayout and I want to draw fading edge of FrameLayout over TextView to indicate that text may be expanded vertically. How to draw fading enge of FrameLayout?
Fragment of layout:
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="@dimen/list_item_collapsed"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</FrameLayout>
解决方案
Add fadingEdge and fadingEdgeLength attributes to your TextView definition
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fadingEdge="vertical"
android:fadingEdgeLength="@dimen/fadelength"
/>
HINT: Try to avoid using frame layouts where necessary, usually they are not required.
这篇关于队的TextView褪色边缘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文