android-vectordrawable Questions

5

Solved

It looks like the only way to go about loading custom icons from Android Vector Resources in the res folder is to do it within a @Composable function using the vectorResource(R.drawable.myVectorNam...

11

Solved

I want to add a new vector asset. I am trying to add a clipArt but it only shows in the dialog box "Nothing to show". No icon is showing and I want to add an icon. I don't know to fix th...

5

is there an easy way to generate Vector Drawable that is a circle with the icon inside from the existing vector drawable? Example:
Glynisglynn asked 20/3, 2018 at 18:1

0

I'm trying to display launcher icon of the app: Image( modifier = Modifier.size(24.dp), painter = adaptiveIconPainterResource(id = R.mipmap.ic_launcher_round), contentDescription = stringResourc...

9

I want to edit the fill Color of a vector-file in Android programmatically. In the xml-file I can set my color with the attribute android:fillColor but I want to change the color in runtime. Any...
Fountainhead asked 14/10, 2015 at 13:37

9

Solved

With the new android support update, vector drawables get backward compatibility. I have a vector image with various paths. I want the color of the paths to change on click of a button or programma...
Joellyn asked 25/2, 2016 at 10:48

4

Solved

enter image description hereThis is the xml file for the SHARE icon. How do I create XML for other icons? <vector xmlns:android="http://schemas.android.com/apk/res/android" android:wid...
Camise asked 28/10, 2015 at 3:25

3

I've been playing a lot with the 9-patch, they are a huge relief when it comes to making a nice background for a button, a form, etc. As the vector drawables are now available with the support lib...
Koumis asked 4/5, 2016 at 19:15

9

Solved

I am new to VectorDrawables. I can see that the default vector drawables provided with android studio like ic_menu_gallery, ic_menu_camera, etc. are working great. So I tried to create my own vec...
Untold asked 15/2, 2016 at 5:19

3

Solved

I created my vector drawable animation and I want to use in in Compose. I found in official documentation that I need to call animatedVectorResource. But whole AnimatedImageVector has been removed ...

5

Solved

I've an app with over 5000 downloads and more than 500 users active daily and out of nowhere I started get an weird error on Crashlytics: Caused by android.content.res.Resources$NotFoundException:...
Gouveia asked 27/10, 2018 at 3:9

3

Solved

How can I convert my android vector drawable to SVG? Don't mark it as duplicate question. I have already tried those methods but didn't work, what I have tried https://shapeshifter.design/ website,...
Luminal asked 23/6, 2020 at 17:7

2

Solved

I had some vector icons that were converted from SVG and I need to customize the tint colors for them based on some conditions, I'm trying to change the tint color programmatically Image( modifier...
Cumulonimbus asked 6/11, 2022 at 21:46

1

How to minimize very long vector path in vector drawable files using avocado optimizer tool. I have tried using svg editor, but vector path is still long, so it's getting warnings as very long vect...
Cosmorama asked 3/11, 2022 at 5:58

2

Solved

My vector drawable from Vector Asset: <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:tint...

2

Is there a way to get SVG path string from the API and create VectorDrawable dynamically? I have been trying to do this for hours without success. Even more, all (!) examples on the Internet expla...
Ovarian asked 23/10, 2015 at 22:12

1

Solved

I want to implement a Sign In With Google button in Jetpack Compose. I downloaded this SVG and added a white background in Inkscape so it would be usable in both the recommended styles (white or bl...

5

After upgrading to 3.0 Android Studio has started to complain about long paths in vector drawables. The warning says: Very long vector path (7958 characters), which is bad for performance. Con...
Snailfish asked 6/11, 2017 at 9:54

1

Solved

I'm trying to implement the new themed icons and I have the problem that my icon is always zoomed in by 2x and I cannot get it to fit the canvas. Below you can see the normal icon on the left and t...

10

I have been using the Android Asset Studio to generate vector drawables from SVG files exported from Zeplin for a while and except a few times, it works fine. But today I got this exception when I ...
Cons asked 17/12, 2017 at 11:46

2

Solved

I wish to simply a vector drawable created from a svg in inkscape. According to Android Studio my vector path is too long. I don't know how to fix it so that it'll work. The code is below, along ...
Oxalis asked 25/7, 2018 at 3:53

18

Solved

Android Studio now supports vector assets on 21+ and will generate pngs for lower versions at compile time. I have a vector asset (from the Material Icons) that I want to change the fill color. Thi...

7

Solved

I have an app that runs perfectly on most devices. However, I'm getting a FATAL exception whenever I try to run my application on devices with API < 21. Here is the log: java.lang.RuntimeExcep...

3

I have TransitionDrawable defined in xml like this: transition.xml <?xml version="1.0" encoding="utf-8"?> <transition xmlns:android="http://schemas.android.com/apk/res/android"> <...
Mouthy asked 11/4, 2018 at 14:9

4

I am getting into a trouble with VectorDrawable in Android. I have a vector drawable file (.xml) and I want to draw it on bitmap. I managed to load this file and draw it on bitmap. I can change its...
Naughty asked 22/12, 2015 at 9:43

© 2022 - 2025 — McMap. All rights reserved.