Reputation: 1655
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>
Upvotes: 1
Views: 7933
Reputation: 10193
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.
Upvotes: 3