Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - support vector drawables on Motorola

I have a problem with rendering vector drawable on Motorola pre-lollipop phones. I tested it on Moto G and other with KitKat. Every time I start application some icons look corrupted and some are missing at all. And after each launch they are corrupted in a different way. On Lenovo, Samsung, AOSP Emulator and others with JB+ till Nougat everything is ok. Only Motorola phones can not render vector drawables with support library well. Does anybody have the same issue?

like image 936
Mykhailo Yuzheka Avatar asked Aug 10 '17 12:08

Mykhailo Yuzheka


People also ask

What is vector drawable in Android?

A VectorDrawable is a vector graphic defined in an XML file as a set of points, lines, and curves along with its associated color information. The major advantage of using a vector drawable is image scalability.

What is the default location of the vector icons imported through Android studio?

Vector Asset Studio adds an XML file defining the vector drawable to the project in the app/src/main/res/drawable/ folder. From the Android view of the Project window, you can view the generated vector XML file in the drawable folder.


1 Answers

Vector Drawables are also supported in cases like TextView's drawableLeft property. go this link Android Studio 1.4

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/icon"
like image 89
AmmAr Yasser Avatar answered Sep 19 '22 03:09

AmmAr Yasser