开发者

Android - Extend an image and keep scale

开发者 https://www.devze.com 2023-03-17 03:27 出处:网络
I\'d like to have an image (DistantImageView, ImageView from the web) with width=\"fill_parent\" and height=\"wrap_content\" while keeping the scale.

I'd like to have an image (DistantImageView, ImageView from the web) with width="fill_parent" and height="wrap_content" while keeping the scale.

The image is smaller than the screen and because it comes from the web, I don't know about the proportions.

I开发者_如何学Go tried

 <DistantImageView
        android:id="@+id/image" 
        android:layout_height="wrap_content" 
        android:layout_width="fill_parent"
        android:scaleType="fitCenter"
 />

It doesn't work, the image is smaller than the screen.

Thanks in advance

0

精彩评论

暂无评论...
验证码 换一张
取 消