0

This is my ImageView in app (1) enter image description here

When I change size of container (LinearLayout for example) my ImageView change image size but border of view remained the same(2).

How I can set scaling for ImageView size and borders? (3)

My ImageView code in xml:

 <ImageView android:id="@+id/image" android:layout_width="100dp" android:layout_height="wrap_content" android:src="@drawable/cover" /> 

P.S. This is my problem in my app - enter image description here

0

1 Answer 1

1

I find - stackoverflow.com/a/10124018/3871859 from here.

My ImageView xml:

<ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:adjustViewBounds="true" android:src="@drawable/cover" /> 

I just add this line:

android:adjustViewBounds="true" 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.