Mick
Mick

Reputation: 1219

Image Size Vary in different Android Phone

Hello I am downloading the bitmap from URL in Android and setting it to the imageview. What weird issue is that same bitmap looks good and large in one Micromax Android phone and in Sony it's size is looking very small.

enter image description here

See barcode appear very small even I have set it width to fill_parent

enter image description here

and In one phone it appears look good, here both phone have same screen width.

enter image description here

<LinearLayout
    android:id="@+id/bottomLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_above="@+id/bottomLayoutofflipicon"
    android:layout_marginLeft="10dip"
    android:layout_marginRight="10dip"
    android:layout_marginTop="10dip"
    android:background="@drawable/rounded_corner2"
    android:gravity="center"
    android:orientation="vertical"
    android:padding="5dip" >

    <ImageView
        android:id="@+id/qrCode"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:adjustViewBounds="true" />

    <TextView
        android:id="@+id/barCodevaluetextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>

Upvotes: 0

Views: 76

Answers (2)

Mick
Mick

Reputation: 1219

Simply by taking large size drawables fixed my issue and I have also used scaletype to centerInside.

Upvotes: 0

savanto
savanto

Reputation: 4550

In your ImageView, change android:layout_width to android:layout_width="match_parent".

Upvotes: 1

Related Questions