Skip to main content

Questions tagged [android-vectordrawable]

A VectorDrawable is a vector graphic defined in an XML file as a set of points, lines, and curves along with its associated color information.

android-vectordrawable
0 votes
1 answer
28 views

SVG pixelized edges in Android Jetpack Compose

I converted the logo from SVG to XML in Android Studio. One change I had to make was replacing 'Fill' with '#pattern' with 'FillColor' because #pattern is not supported in Android. I don't think that ...
StonedCodingTom's user avatar
0 votes
1 answer
75 views

How to see / view the Android vector drawable XML?

How can I visually see a picture from an Android vector drawable XML? I disassembled the Apk-file, and now I want to replace the icons, but how can I visually see them in the code. Is there a program ...
denbon's user avatar
  • 19
1 vote
1 answer
32 views

How can I make AnimatedImageVector animate a single path a time with jetpack compse?

I am using SVG file that contains 33 paths and every path is a circle drawable.xml: <group android:name="circle1" android:pivotX="242" android:pivotY="242" ...
Mohamed ALI's user avatar
2 votes
0 answers
260 views

Jetpack Compose displaying Adaptive Icon Painter Resources: Only VectorDrawables and rasterized asset types are supported ex. PNG, JPG, WEBP

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 = ...
user924's user avatar
  • 11k
1 vote
0 answers
21 views

How to use MaterialTheme.colorScheme.primary inside a vector?

I have this vector: <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="100dp" android:height="100dp" android:viewportWidth=&...
The One's user avatar
  • 81
0 votes
0 answers
57 views

Cut out part of a vector drawable path

I have this xml vector drawable: <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:...
Quinn's user avatar
  • 8,366
0 votes
0 answers
23 views

How to make the canvas not square?

I have a vector image in my android app: <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="800dp" android:height="800dp" ...
VanechikSpace's user avatar
0 votes
1 answer
41 views

what tint value for vector asset should be set?

When adding an icon using right click on res folder -> new -> Vector Asset in android studio, color value(this is equivalent to android:tint in xml file once it is added to drawable) set to #...
foseja's user avatar
  • 305
0 votes
0 answers
34 views

How to fill color in the inside transparent portion of vector drawable without filling color in the outside rectangualar bounds of it?

In the above vector drawable, I can modify the tint of the solid portions of the drawable using say green color and apply it using PorterDuff.Mode.SRC_ATOP. But I can't seem to apply a color inside ...
Satty's user avatar
  • 65
0 votes
1 answer
23 views

how to create a vector drawable for a document in a circle in Android

how can I draw a vector drawable of a document in a circle which looks like this please or something similar Thanks R
BRDroid's user avatar
  • 4,248
0 votes
1 answer
600 views

Jetpack Compose App crashed when updated from previous version

My app crashes when updated from previous version with Exception: java.lang.IllegalArgumentException: Only VectorDrawables and rasterized asset types are supported ex. PNG, JPG It runs fine when new ...
Harsh Nandwani's user avatar
3 votes
0 answers
54 views

Issue with Gradient Drawable on Android 6 Marshmallow while using Splash Screen API

I recently migrated my existing splash screen activity to the Splash Screen API, which offers backward compatibility up to API 21. I'm utilizing a vector drawable for the splash screen icon, and it's ...
Dayakargoud Bandari's user avatar
0 votes
0 answers
47 views

Is there a way to organize my drawables in android studio?

Since I can't have directories in my res/drawable directory, how can I organize my drawable folders like buttons, icons, images, bg_images, etc. How to have an organized folders for the drawable. I ...
Tristan Ehron Tumbaga's user avatar
0 votes
2 answers
67 views

How to make EditText and Button have this colored border?

How can make EditText with this border and Button with this border. I could not find do this with drawable. I use ImageView with this. But I can not use ImageView for EditText. How can do this?
Ahmet Yılmaz's user avatar
0 votes
1 answer
36 views

Android complicated schematic view

I need to make an interactive research fragment for my game and got an SVG file exported from Figma with all the rects, circles, texts, etc. It must be scaleable (zoomeable via touch input), draggable ...
Nikitiy's user avatar
  • 35
0 votes
1 answer
61 views

Vector drawable scaling in ImageView on Android

I got a kind of schematic presentation of data that is stored as a vector drawable, obtained from an original image in SVG format. I need to zoom it in and out, but after changing scaleX and scaleY ...
Nikitiy's user avatar
  • 35
-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
0 votes
2 answers
172 views

How to change color of drawable ImageView android kotlin

i have a vector icon in my drawable package ic_vector_point_image: <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="10dp" android:height=...
onesector's user avatar
  • 410
0 votes
0 answers
20 views

Does the scaled down large drawables result in final apk size and RAM usage?

I wonder is there any difference between two 24dp x 24dp vector drawables one with coordinates range between 0 to 24 and another with coordinates range between 0 to 2400 and with appropriate view ...
user21193451's user avatar
0 votes
0 answers
17 views

About dynamic generation and loading of VectorDrawables

I'm in the development of an android app that needs to show VectorDrawables in a dynamic fashion, so I wrote a C library that outputs these for me based on an input string. I also integrated the usual ...
user1476851's user avatar
0 votes
1 answer
200 views

Vector graphic does not show properly

I have a graphic for a Splash Screen @Composable fun SplashScreen() { Column( modifier = Modifier.fillMaxSize(), verticalArrangement = Arrangement.Center, ...
Chris Pi's user avatar
  • 582
2 votes
4 answers
605 views

Rotate ImageVector in Compose

I'm storing a material icon in a data class like so: import androidx.compose.ui.graphics.vector.ImageVector data class Item( val icon: ImageVector ) val item = Item(Icons.Filled.Send) The item ...
Marsroverr's user avatar
1 vote
1 answer
677 views

Jetpack Compose: AnimatedImageVector not Animating

Please, I need help resolving this issue. I am trying to get a drawable vector to animate by rotating it. The drawable vector displays but it doesn't rotate as expected. Thanks in advance! Below are ...
Trailblazer's user avatar
0 votes
1 answer
30 views

How to create an andoid Vecor Asset from any image I have?

I have some icons as png that I want to create a vector asset for. Let's say I want to create a heart; I found this code on StackOverflow: <vector xmlns:android="http://schemas.android.com/apk/...
Mesameh's user avatar
  • 33
1 vote
1 answer
192 views

Path traversal animation in Shape-Shifter

I am using ShapeShifter at ShapeShifter I want to create a vector animation where a small rectangle traverses the border of a rectangle. Sounds like an easy animation to create! Shapeshifter provides ...
i_o's user avatar
  • 789
0 votes
1 answer
282 views

Setting a vector drawable to meet the Splash Screen API requirement

Using the Android Splash Screen API,the requirements for putting an icon with no background on splashcreen is this: "App icon without an icon background: this must be 288×288 dp and fit within a ...
lanezalbryt's user avatar
0 votes
1 answer
608 views

Resources$NotFoundException: Resource ID

I am trying to figure this issue but I don't understand why my Vector/png drawable is missing when I put them all in respective directory/folder. Here is the below logs. Fatal Exception: android.view....
Pratik's user avatar
  • 30.7k
1 vote
2 answers
648 views

Why is Android rendering the vector drawable for the splash screen wrongly?

Using following vector drawable in a splash screen the image renders completely wrong and truncated. I tried changing the width and height many time but no difference. Other drawables don't present ...
David's user avatar
  • 4,607
2 votes
0 answers
29 views

Saving photo with transparent background to Contacts

I want to add a contact to the android contacts database which is working fine. As a Contact Photo there is a Vector from resource which gets converted to a Bitmap and then into a ByteArray like this: ...
Chris Pi's user avatar
  • 582
0 votes
1 answer
80 views

Passing an XML vector image between activities

I am trying to pass an icon from an icon selection page, back to my creation activity where I then update the image and object to be created. I have tried a few different methods on a half dozen posts ...
Luke Mills's user avatar
0 votes
1 answer
70 views

Why is my Android Drawable showing up with a color on top of it?

I am developing a simple, daily task reporting Android Studio app as an internal tool for the IT department I work for. I'm trying to make it as informative and easy to use as possible, adding user ...
EddyMexico's user avatar
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
81 views

Android: ImageView with svg looks blurry

I'm many svg exported from Adobe illustrator, it only have a size of 9.36*10.8. When I use the xml vector of this svg (converted by Android Studio) as the src of ImageView with a size of 19.5dp * 22....
Hhry's user avatar
  • 913
1 vote
1 answer
128 views

Clear tint on a vector drawable programmatically?

I'm trying to toggle the tint of an ImageView whose source is a vector drawable: <ImageView android:id="@+id/iv_lightbulb" android:layout_width="wrap_content" ...
HukeLau_DABA's user avatar
  • 2,486
8 votes
2 answers
4k views

How to set tint mode and tint color for compose vector icons programtically

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( ...
MARK 's user avatar
  • 414
5 votes
1 answer
5k views

How to minimize "very long vector path" in android vector drawable files

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 vector ...
chanthini begam's user avatar
2 votes
0 answers
479 views

How to rotate ImageVector’ pathData in Compose

I am trying to implement similar animation like this, with Jetpack Compose figure: https://dribbble.com/shots/4762799-Microinteraction-Exploration-002 For the play icon’s transformation (from a ...
Sinyuk's user avatar
  • 287
1 vote
1 answer
448 views

In Android, how to change a specific shape's color in a drawable xml with many shapes with colors dynamically?

In Andoroid, I need to change a change a specific shape's color in a drawable xml with many shapes with colors dynamically. This drawable applied as a background to a Linearlayout <?xml version=&...
RagAnt's user avatar
  • 1,076
0 votes
1 answer
460 views

Increasing the PNG quality in Android

I am a beginner in Android Development and am trying to understand how to use PNG or vector drawable (XML) files in my Android App. To practice, I create an App with both images below: https://i....
Guilherme Hepfener's user avatar
0 votes
1 answer
323 views

Unable to fill vector drawable with color

I am trying to split an XML with a drawable of an insole in 3 regions which I want to fill with a color. I have tried editing the file but I wasn't able to fill in the region with a color. I have the ...
Sifu Duck's user avatar
0 votes
0 answers
89 views

Navigation Drawer with ImageView

I am learning & developing a small app in Android Studio using Kotlin and have a question about the navigation drawer. Is it possible to add a vector drawable animation in place of imageview as ...
speedflow's user avatar
1 vote
2 answers
950 views

Android Vector xml file - is it possible fix the color without being affected by tint in Jetpack Compose?

I have this vector drawable. ic_check.xml <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="20dp" android:height="20dp" ...
Arst's user avatar
  • 3,249
2 votes
1 answer
2k views

How do you fill in the background of a vector image in Jetpack Compose?

I have a vector image that I'm trying to put on a button. Unfortunately, my image shows with a white background. How do I fill in the background with the color of the button? Here is the code for ...
Kristy Welsh's user avatar
  • 8,350
3 votes
2 answers
3k views

Not able to display svg format image in jetpack compose

I tried to display svg image in my project but some of the file works but throws the error.. I tried with the coil library too but it doesn't show anything. While using Image compose with ...
Jeevan Rupacha's user avatar
1 vote
1 answer
81 views

Use SVG in ImageView directly

Here is the code of SVG, I already create a file in drawable, but it does not appear when added in src of ImageView. <svg width="60" height="60" viewBox="0 0 60 60" ...
Aniket Jain's user avatar
1 vote
0 answers
134 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. ...
beigirad's user avatar
  • 5,574
11 votes
1 answer
5k views

How can I create a coloured Icon from a vector drawable resource in Jetpack Compose?

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 blue ...
realh's user avatar
  • 1,081
2 votes
0 answers
503 views

light icons in darkmode

In Android Studio, I've added a bunch of icons to my app via res -> New -> Vector Asset. When I tested my app on a device with darkmode, I noticed, that some icons changed their color with the ...
user1785730's user avatar
  • 3,245
0 votes
0 answers
374 views

XML drawable cut corner instead of round

Similar to the M3 cornerFamily feature, how to achieve it via XML drawables? Current code <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas....
Bitwise DEVS's user avatar
  • 3,146

15 30 50 per page
1
2 3 4 5
15