1
我試圖在HorizontalScrollView中製作一個ImageView,但imageView的寬度是屏幕的兩倍,並且超出邊界。HorizontalScrollView中的Android ImageView get的兩倍於屏幕的寬度
我的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>
And a image of what I get (click me!)
有誰知道解決這個問題呢?
問候
我有同樣的問題,但只在我運行Android 4.2.2的Nexus 4上。你的配置是什麼? – l33t
鏈接已損壞。請修復。謝謝。 – Shirane85