Try using the android:overScrollMode
attribute.
Just add
android:overScrollMode="always"
to your HorizontalScrollView
.
android:overScrollMode can have three values: "always", "never", "ifContentScrolls".
Question
Im trying to add fading edges for simple HorizontalScrollView. Documentations about fadingEdge attribute:
This attribute is deprecated and will be ignored as of API level 14 (ICE_CREAM_SANDWICH). Using fading edges may introduce noticeable performance degradations and should be used only when required by the application's visual design. To request fading edges with API level 14 and above, use the android:requiresFadingEdge attribute instead.
Ok, but this layout not showing any fading edges, too:
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/horizontalScrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:requiresFadingEdge="horizontal"
android:fadingEdgeLength="50dp"
tools:context=".MainActivity" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
...
</LinearLayout>
</HorizontalScrollView>
What am I missing?
No correct solution
OTHER TIPS
Try using the android:overScrollMode
attribute.
Just add
android:overScrollMode="always"
to your HorizontalScrollView
.
android:overScrollMode can have three values: "always", "never", "ifContentScrolls".
Just use
android:requiresFadingEdge="horizontal|vertical"
android:fadingEdgeLength="10dp"