我正在尝试在HorizontalScrollView中创建一个ImageView,但是imageView的宽度是屏幕宽度的两倍,并且中途超出界限.
我的XML:
<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/horizontalScrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:baselineAligned="true"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/penguins" />
</LinearLayout>
</HorizontalScrollView>
Run Code Online (Sandbox Code Playgroud)
有谁知道这个问题的解决方案?
问候