Questions tagged [android-drawable]

In Android, a Drawable is a general abstraction for "something that can be drawn."

2993 questions
47
votes
6 answers

Android Background Drawable Not Working in Button Since Android Studio 4.1

I find out that since Android Studio 4.1 I cannot change the background color of a Button by setting color on its android:background, just no effect. And custom Drawable is not working as well. My background Drawable:
47
votes
3 answers

Shaped drawable with selectableItemBackground as background

I have couple buttons that I need an oval shaped border. So i have this in a capsule_border.xml
47
votes
5 answers

Android shape border with gradient

I want to create a border for a linearLayout. So I decide to create a shape. I want the border to have a gradient. The following is not doing it. It fills the rectangle and then creates a stroke. I don't want a filled rectangle, just the stroke. And…
learner
  • 11,490
  • 26
  • 97
  • 169
46
votes
2 answers

How to change a layer-list drawable?

Trying to learn some new things and can't figure this one out, any help is appreciated. Given this simple code which is right from Google's documentation: layers.xml:
ShadowGod
  • 7,891
  • 3
  • 28
  • 31
45
votes
2 answers

Android vector drawable editor

I'd like to modify existing Android drawable vector XML resource, but Android Studio let do it only in XML source. Could you suggest a tool for "interactive" editing Android drawable XML? Or may be there is a way to import such files to, say…
Alexey
  • 2,980
  • 4
  • 30
  • 53
44
votes
3 answers

Getting black ImageView using Picasso and Glide

The problem I'm writing an Android app that's supposed to have a "Slideshow" feature on it. I've found this nice library, based on Picasso, that does exactly what I wanted, and it worked just fine most of the times. Problem is, sometimes my images…
Mauker
  • 11,237
  • 7
  • 58
  • 76
42
votes
2 answers

Using layer-list to display some drawable images

Android studio 2.0 Preview 3b Hello, I have created the following layout that I want to use for a background for my app. I am using the layer-list and I want to display a bowl of peas in 2 locations. Everything looks ok in the preview, but when I…
ant2009
  • 27,094
  • 154
  • 411
  • 609
41
votes
1 answer

Android text in drawable layer-list

I am trying to implement splash screen without any extra activities, using theme call in the manifest file's tag. In my styles.xml