Reputation:
I'm trying to add two images, one above the other, the thing is that with my LinearLayout
is creating a blank space that doesn't adjust those ImageView
. What's the problem on my activity2.xml
?
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/scrollView">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:src="@drawable/ic_launcher" />
<ImageView
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:src="@drawable/ic_launcher" />
</LinearLayout>
</ScrollView>
The problem is this
Upvotes: 0
Views: 47
Reputation: 20626
I think you should use adjustViewBounds
Add this line in your ImageView
android:adjustViewBounds="true"
Upvotes: 1