Android Can';t更改淡入边长度
当有更多内容时,我试图使滚动视图的边缘淡出,问题是有淡出的情况发生,但它很短,很难看到,即使我更改了淡出边缘的长度,这是我用来制作淡出边缘的代码:Android Can';t更改淡入边长度,android,scrollview,Android,Scrollview,当有更多内容时,我试图使滚动视图的边缘淡出,问题是有淡出的情况发生,但它很短,很难看到,即使我更改了淡出边缘的长度,这是我用来制作淡出边缘的代码: fullArticleScrollView = (ScrollView) findViewById(R.id.FullArticleScrollView); fullArticleScrollView.setFadingEdgeLength(20); fullArticleScrollView.setVerticalFadingEdgeEnabl
fullArticleScrollView = (ScrollView) findViewById(R.id.FullArticleScrollView);
fullArticleScrollView.setFadingEdgeLength(20);
fullArticleScrollView.setVerticalFadingEdgeEnabled(true);
这是xml文件:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/FullArticleScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:fillViewport="true"
android:orientation="vertical"
android:requiresFadingEdge="vertical"
tools:context="com.cloudappers.twocents.FullArticleActivity" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:orientation="vertical">
<TextView
android:id="@+id/fullArticleTitleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/articleContentTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</ScrollView>
我正在安卓4.2上测试