ANTI_ALIAS_FLAG for ImageView in layout?

Does anyone know how to apply ANTI_ALIAS_FLAG to ImageView in layouts and not in Java?

+7
source share
2 answers

You want to apply the android:antialias="true" attribute, for example:

 <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:antialias="true" /> 
+6
source

2013-year-way: declare a special xml resource that describes ImageView content. For example, we want ImageView to contain a smoothed Bitmap. Therefore, we need to write something like this:

 <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:antialias="true" android:src="@drawable/ic_draggable_item"/> 
+5
source

All Articles