您好我正在Android中从URL下载位图并将其设置为imageview
。奇怪的问题是,在一个Micromax Android手机和索尼中相同的位图看起来很好而且很大,它的尺寸看起来非常小。
即使我将宽度设置为fill_parent
并且在一部手机中看起来很好看,这两款手机都有相同的屏幕宽度。
<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>
答案 0 :(得分:1)
在ImageView
中,将android:layout_width
更改为android:layout_width="match_parent"
。
答案 1 :(得分:0)
只需使用大尺寸drawables修复我的问题,我也使用了scaletype
来centerInside。