Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImageView doesn't fill entire width

I'm developing an Android 2.2 application for multiple devices and I have a problem with an image.

This is my layout:

<?xml version="1.0" encoding="utf-8"?>
    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/scrollView1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:contentDescription="@string/layout_empty"
            android:src="@drawable/faqs" />

    </ScrollView>

And this is what I see on my tablet device:

enter image description here

It looks perfect on my HTC Desire.

What is wrong?

like image 333
VansFannel Avatar asked Feb 26 '26 11:02

VansFannel


1 Answers

add android:scaleType="fitXY" to your ImageView

like image 53
K_Anas Avatar answered Mar 02 '26 14:03

K_Anas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!