Skip to main content

All Questions

-1 votes
1 answer
123 views

Android Studio Vector Asset: Error while parsing ****.svg- Not a proper SVG file

When I try to import my SVG through Android Studio, I get this error: Error while parsing image.svg - Not a proper SVG file Where can I find more information about what actually went wrong? I've tried ...
VIN's user avatar
  • 6,786
1 vote
0 answers
150 views

How to reuse a group and/or path in android vector drawable

I have the following vector drawable code <vector android:name="vector" android:width="9dp" android:height="16dp" ...
K-Galalem's user avatar
  • 310
1 vote
0 answers
69 views

Android Vector Drawable with ImageView: the image is being cutted at the bottom

I have the following svg (vector file): <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="18dp" android:height="3dp" ...
Hhry's user avatar
  • 913
0 votes
0 answers
176 views

How to match Android Gradient Rendering with SVG BoundingBox Units

I am trying to replicate an SVG in Android vector drawable using the LinearGradient class. For bounding box gradient units, I am calculating the endpoints of the gradient line segment by using the ...
Sourabh's user avatar
  • 545
1 vote
2 answers
442 views

Android button overlay with border custom view or vector drawable

I would like to create a custom Floating action button with a round frame. like the following image I ended up making a custom view for it. But it's so glitchy. Here is the onDraw function override ...
abd3lraouf's user avatar
  • 1,578
2 votes
1 answer
613 views

Empty generated vector file from psd

I have some psd (Photoshop) file. In android studio I have created a new vector assets with these psd file. During the creation I don't have preview and the XML file generated contains only this <...
Dennis A. Boanini's user avatar
10 votes
0 answers
6k views

Use PDF vector graphics in Android Studio

I have PDF image assets from an iOS project that I need to add to an Android Studio project. Is it possible to add PDFs to Android studio, or do I have to use an external converter like Gimp or ...
jungledev's user avatar
  • 4,295
1 vote
0 answers
168 views

VectorDrawable icons: approach to color changing

I have some navigation menu with vector drawable icons and i want to change icons color according to menu item state. To do it i can (using selector of course): change icon tint color or ...
alexshr's user avatar
  • 1,009
0 votes
1 answer
813 views

use coloured vector image in android studio

I want to use Colored svg images on my apps footer, but I am getting two problems:- I am able to use the images but only after I make a xml through "Image asset" option. When I apply that image the ...
tech office's user avatar
5 votes
2 answers
6k views

Set Border/Stroke to Vector Drawable Programmatically

I can change the color of vector drawables programmatically, but I want to apply the stroke to vector drawable. I need a method that will change the vector drawable stroke at runtime: previously i ...
waqas's user avatar
  • 51
0 votes
0 answers
187 views

Using vector drawables, how would I scale an image depending on the size of the viewport

Before, I did this by just having the different versions of the images within their respective res/drawable folder. thanks i want to fill the available space while retaining the scale. i want the ...
user3875913's user avatar
6 votes
2 answers
3k views

Auto Mirroring for RTL layout doesn't work in Android versions below 6.0

As you know Vector Drawables was added in Android Support Library 23.2 which announced in Android Developer Blog that for all versions of android we can use it instead of adding extra icons in ...
Nava's user avatar
  • 368
1 vote
1 answer
2k views

AnimatedVectorDrawable animation doesn't start

I'm trying to create a simple play to pause and reverse animation on click using AnimatedVectorDrawable. Somehow the animation doesn't start. My code is as below: MainActivity.java public class ...
Pravin Sonawane's user avatar
22 votes
3 answers
8k views

Precise control over Androids VectorDrawable animations

UPDATE: Solution found! Scroll down for my accepted answer! I want to animate multiple elements of one image and link the animation to ViewPagers position (so multiple elements are morphing or flying ...
Arthur's user avatar
  • 1,443
53 votes
9 answers
68k views

How to change color of vector drawable path on button click

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 ...
suku's user avatar
  • 10.8k

15 30 50 per page