android-vectordrawable

“Nothing to show” when I tried to insert a new Vector Asset in Android Studio

点点圈 提交于 2020-11-24 17:57:12
问题 "Nothing to show" error - vector asset Hey, all. So, recently I updated my Android Studio Version to 4.1 (the latest version). I wanted to add a vector asset just like the usual but..somehow..the preview of the icons did not show up. I can't choose a vector asset or even add one. Is there any way to fix this? Or maybe, a way to downgrade the version? Thank you so much :( 回答1: This problem seems to be originated with the Android Studio Windows version 4.1. I have the same exact problem and I

Exception android.content.res.Resources$NotFoundException: File res/color/selector_tab_blue_white.xml from drawable resource ID #0x7f0601d8

こ雲淡風輕ζ 提交于 2020-05-17 05:55:06
问题 I am using tabLayout as <com.google.android.material.tabs.TabLayout android:id="@+id/tabLayoutSubscriptionDays" style="@style/CustomTabLayoutTextSizeSix" android:layout_width="match_parent" android:layout_height="@dimen/_40sdp" android:background="@color/white" app:tabBackground="@color/selector_tab_blue_white" app:tabIndicatorColor="@color/transparent" app:tabMode="fixed" app:tabSelectedTextColor="@color/white" app:tabTextColor="@color/black" /> In some devices i am getting exception as like

Use fillType=“evenOdd” on Android 21

和自甴很熟 提交于 2020-02-29 11:35:12
问题 I have an SVG image that I want to include in an Android project. The minSdk version for the project is 9. Android Studio is generating PNG files for the SVG. However, for API 21+, Android studio includes the SVG in a drawable-anydpi-v21 resource folder. That means that any device running API 21 and up will use the SVG instead of the PNGs. And that is the problem: my SVG requires android:fillType="evenOdd" . The PNG are properly generated, but for the SVG, because that attribute is API 24+,

Is it possible to create a VectorDrawable from File System (*.xml File)

痞子三分冷 提交于 2020-01-22 19:50:47
问题 I am trying to use VectorDrawables in my Android App. I want to load an xml File from the File System and get an Instance of android.graphics.Drawable to display it in an ImageView . If i add the xml File to the Resources directory it works. But when i try to load it from the filesystem i always get a NullPointer. I am currently trying to load the File via Drawable.createFromPath(*Path to File*) or VectorDrawable.createFromPath(*Path to File*) , but i keep getting a NullPointer. The File