connectortriada.blogg.se

Android vector td
Android vector td









android vector td

I couldn't find a way to resize the vector drawable on pre-API 21 devices.

#Android vector td how to

My updated question is how to set the size of the vector drawable inside a button/toggle button/radio button without reducing the size of the button itself? If I reduce the button size what I'm doing is reducing the clickable area of the button. The second button doesn't need to have a background solid color so I'm not using the layer-list tags => no way to set a top|bottom|left|right margin for the drawable. However without the android:top|bottom|left|right tags, the drawable is stretched across the whole area of the button. I managed to reduce the blurring by increasing the width and height of the vector drawable. So: How do I make the icon and the generated PNG appear smaller, less blurry and with the background colour set in the resource file? Thank you.ĮDIT: I managed to get the solid colour background with the icon by combining them in a separate xml file with layer-lists: I wanted also to make the icon appear a bit smaller by tweaking the values and I noticed increasing the viewport dimensions decreases the icon but I'm not sure I understand why. The xml for the drawable is (the default from the material icons): What's more is that the button's background solid color is supposed to be this light green that you see on the left but the drawable overwrite it: The Android Studio Vector Assets tools convert vector drawable to PNG-s for devices pre-Lollipop but I get really bad quality PNG-s as you can see here:











Android vector td