All Questions
Tagged with android-vectordrawable drawable
27
questions
1
vote
0
answers
135
views
stop generating .png from vector drawables in api >= 21
After bumping minSdk version to 21 and removing vectorDrawables.useSupportLibrary = true from build.gradle in whole project, there are png version of vector drawables in the output apk/bundle file.
...
0
votes
1
answer
1k
views
Unable to Start Activity... android.content.res.Resources$NotFoundException: Drawable com.app: drawable/abc_vector_test with resource ID #0x7f07005c
I´m trying to do an App that works with Firebase and authenticates with Google, Email and Facebook.
Is exactly in the phase of Facebook sync that I had this problem:
E/AndroidRuntime: FATAL EXCEPTION: ...
6
votes
2
answers
2k
views
Android How to Remove the Inner Padding of a Vector Asset Drawable
My vector drawable from Vector Asset:
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
...
46
votes
11
answers
24k
views
How I fix NOTHING TO SHOW in my vector asset in android studio
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 this. ...
0
votes
0
answers
105
views
Loading SVG by Uri and removing whitespace in Android
The image url is:
https://static-qa-singlecare.s3.amazonaws.com/content/images/pharmacy/logo-color-riteaid.svg
If download we can see it contains a lot of whitespace top and bottom.
I am using this ...
0
votes
1
answer
779
views
half rectangle shape drawable shapes android
I use this drawable code:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item >
<rotate
android:fromDegrees="45"
...
0
votes
0
answers
47
views
avoid multiple vector drawable object
In my application, each time I inflate a recycler view list item I need to set its drawable color,
Drawable drawable = DrawableCompat.wrap(ContextCompat.getDrawable(mContext, R.drawable....
1
vote
0
answers
567
views
how create android drawable xml states with background and icon <vector> (svg)
Good day everyone. Can you please tell us how to make and organize the implementation of icons with backgrounds in Android in different States (hover, blocked, normal state). I saw that the app often ...
1
vote
3
answers
741
views
drawableLeft vector image api < 21 from XML
I have support lower end device API < 21. I already have used drawableLeft, drawableRight in many place in my existing project. When ever I am running API 19 app is crashing saying can't find that ...
0
votes
1
answer
43
views
Android App stops when Button has drawable<xyz>
I have a problem adding an icon to a button either left of text or above.
This is my test scenario:
My app already has a main activity with a button to start the newly added test activity.
I add an "...
7
votes
3
answers
2k
views
Vector Drawables sometimes become blurry
I am working on an existing app that needed some update and as soon as I replaced some png icons with vector drawables something very odd happens:
these vector drawables sometimes become blurry. I ...
4
votes
2
answers
3k
views
Vector Drawables in Layer List on Android API 16 and higher
I am having some trouble with vectors drawable on older API version in Android. I need to change drawables at runtime each time the activity starts should load the corresponding svg file.
This is my ...
0
votes
2
answers
869
views
Android App Crashes while rendering vector asset on API 19 works fine on API above 20
App Crashes while starting MyActivity on Android API level 19 with following code and stack trace.
This works fine on Android API level 21 and above.
Vector Asset : ic_warning_white_24px.xml
...
2
votes
1
answer
2k
views
VectorDrawable not showing or drawed wrong
I have 5 vectorDrawables, where 3 of them is generated from an PSD given to me from google.
Two of them is showing correctly (both from the generated vector from PSD), but the other two is not ...
0
votes
1
answer
452
views
Vector drawable not scaling
I'm trying to set my linearlayout background to a vector drawable, however it is not scaling to fill the entire layout, below is my xml:
<LinearLayout
android:id="@+id/ideaBody"
android:...
7
votes
1
answer
2k
views
How to set Drawable from xml vector inside ImageSpan
How to set Drawable from xml vector inside an ImageSpan?
I use this two methods below. But my icon didn't show. When I use png from drawable resource icon shows up. Any idea?
private void ...
31
votes
1
answer
9k
views
Fliping Drawable Image in Vector Drawable
I have found this vector drawable resource here. What I would like to do is flip it so the X is on the other side.
I managed to do this in the layout, like in this example by adding:
android:scaleX="...
2
votes
2
answers
799
views
Android: Tint one of three icons
I need 3 icons: ContextCompat.getDrawable(this, R.drawable.my_vector_drawable).
First – without tint, second – with tint, third – without tint too,
Ok.
ImageView img1 = (ImageView) ...
35
votes
4
answers
19k
views
Vector Drawable in Layer List on Older Android Versions
On newer Android versions, the following code:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
&...
0
votes
1
answer
771
views
Problems resizing a vector drawable programatically
This album explains what I want to do, and the problem I'm having when the vector doesn't resize: https://i.sstatic.net/S1e5c.jpg
This is the approach I've taken to try scaling the vector, but it ...
3
votes
1
answer
705
views
XmlPullParserException unsupported feature
I am trying to read a drawable xml file from a jar file in my android project.
private Drawable readDrawableFromJar(String p_strFilePath) {
InputStream stream = getClass().getClassLoader()....
5
votes
0
answers
435
views
How To Re-use A Vector In Android XML With A Different Color
Let's say I have a complex vector image. The path data has a fillColor. I am using an API that demands a drawable resource ID. I want to give this API three different vector images, where the only ...
0
votes
2
answers
604
views
What is the alternate of SVG fill attribute in vector drawable
I have converted .svg file into VectorDrawable .xml file, but .svg file uses fill attribute which is not get converted into .xml file.
Actually fill method is not supported by this Converter which i ...
0
votes
1
answer
1k
views
Right to left check arrow
I need right to left check arrow like the second arrow in picture for my background drawable in android
check arrow image
I need to rotate left to right check arrow vector icon
<vector ...
0
votes
2
answers
969
views
How to properly tint VectorDrawables so they work in pre-lollipop devices?
Well, I recently started using VectorDrawables and I thought they would work normally in all android versions, but it seems they cause crashes in pre-lollipop devices.
The thing is I'm creating a ...
3
votes
1
answer
2k
views
Vector Drawables Using Lots of Memory
So I have 11 different drawables that I have made into vectors, I have used them as images for all devices that are on versions later than lollipop and it works ok as images but the vectors either ...
3
votes
1
answer
731
views
Vector Drawable is memory efficient?
Sorry for putting a obvious question (?) but it is troubling me for sometime. I am using Glide for image loading and find it quite well in memory management. Now I am thinking to move to Vector ...