ANTI_ALIAS_FLAG for ImageView within layout?

Kevin Parker picture Kevin Parker · Mar 30, 2011 · Viewed 10.3k times · Source

Does anyone know how to apply the ANTI_ALIAS_FLAG to ImageView's in layouts rather than in Java?

Answer

Chris Cashwell picture Chris Cashwell · Mar 30, 2011

You want to apply the attribute android:antialias="true", like so:

<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" />