Issue
While loading image in ImageView for Android Studio using android:src="@mipmap/stunner my image is getting blurred out, What to do?? Please help...
My code is as follows:
<ImageView
android:src="@mipmap/stunner"
android:adjustViewBounds="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="2dp"/>
Solution
Please use it as a drawable rather than using it as a mipmap. Mipmap is used for app icons but not for drawables
Here is the code and output with drawable
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/archive_task_open_btn"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="2dp"
android:adjustViewBounds="true"
android:src="@drawable/bg" />
</FrameLayout>
Answered By - Viswanath Kumar Sandu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.