alexjlockwood / avocado

🥑 Vector Drawable optimization tool 🥑

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resulting path causes lint warning

gabrielittner opened this issue · comments

Original:
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"

Result:
android:pathData="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"

Lint output:

/home/circleci/timetable/app/src/main/res/drawable/ic_action_delete.xml:2: Error: Use -0.9 instead of -.9 to avoid crashes on some devices [InvalidVectorPath]
    <path android:fillColor="?android:textColorPrimary" android:pathData="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/>
                                                                                                       ~~~
/home/circleci/timetable/app/src/main/res/drawable/ic_action_delete.xml:2: Error: Use 0.9 instead of .9 to avoid crashes on some devices [InvalidVectorPath]
    <path android:fillColor="?android:textColorPrimary" android:pathData="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/>
                                                                                     ~~

Sighs... is this a samsung thing or what... -.-

Anyway, thanks for reporting! I'll probably disable that particular optimization then... it shouldn't have any impact on rendering performance anyway.

Do you happen to know where the source code for these lint checks are, BTW? Trying to find it now... I wanna know if there are any other lint checks I should know about.

BTW, it looks like there is a quick fix in Android Studio that you can use to fix the lint warning... you know, until I publish the fix. :)

Fixed! Will publish within the next couple days.

Awesome, thanks

Released this morning. Still gotta fix the scientific notation lint warning though (I created another bug for that).