我正在尝试在 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>
有谁知道这个问题的解决方案?
问候