【发布时间】:2019-01-02 15:54:33
【问题描述】:
我在滚动视图内的线性布局内有一个图像视图。我无法让 ScrollView 在图像上方和下方停止滚动。我不希望用户能够滚动超出图像的边界。 这是我的 XML:
<ScrollView
android:id="@+id/scrollViewLegend"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:background="@color/Copper"
android:scrollbars="vertical"
android:layout_marginTop="2dp"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/legend"
android:scaleType="fitStart"/>
</LinearLayout>
</ScrollView>
任何帮助将不胜感激。 谢谢。
【问题讨论】:
标签: c# android xml xamarin android-scrollview