Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: ImageView disable scaling

How can I disable automatic scaling in imageView?

like image 902
Tomer Avatar asked Mar 27 '26 23:03

Tomer


2 Answers

place your images in a folder called drawable-nodpi. This prevents automatic scaling of images.

like image 128
Raja Avatar answered Mar 29 '26 13:03

Raja


Try different android:scaleType parameter

<ImageView android:id="@+id/image" 
android:layout_height="fill_parent"
android:layout_width="fill_parent" 
android:scaleType="center" />
like image 32
Dmytro Danylyk Avatar answered Mar 29 '26 12:03

Dmytro Danylyk



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!