我有一个可滚动的 TextView ,我想淡化底部边缘。我试过:
android:requiredFadingEdge="vertical"
但这只会淡化顶部。如何淡化底部而不是顶部?
最佳答案
如果您的可滚动 TextView
恰好是通过将其包装在 ScrollView
中实现的,那么只需添加 android:requiresFadingEdge
和 android:fadingEdgeLength
用于 ScrollView
。
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:requiresFadingEdge="vertical"
android:fadingEdgeLength="@dimen/spacing_small">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical" />
</ScrollView>
关于android - 如何淡化可滚动 TextView 的底部边缘?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36704519/