xml-drawable Questions

5

Solved

I have a gradient I really like but I created it using XML drawable: <gradient android:startColor="#DD181C18" android:endColor="#809C7D5A" android:angle="90"/> What would be an easy way...
Rosarosabel asked 15/12, 2011 at 12:13

6

Solved

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...
Barbell asked 1/1, 2014 at 16:49

5

Solved

I have a custom progress bar that looks like this: Here's the .xml code I've used to create it: background_drawable.xml <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="ht...

4

Solved

Uisng XML is it possible to create a drawable where half of it would be color1 and another half would be color2? When I set that drawable as a background of a view it should look like in the image ...
Percept asked 30/6, 2016 at 14:32

5

Solved

I looked through multiple similar questions, although I haven't found a proper answer to my issue. I have a drawable, defined in shape.xml <?xml version="1.0" encoding="utf-8&quot...
Misfortune asked 24/6, 2014 at 14:19

4

Solved

How can I make this shape using xml drawable? Been fighting over it quite some time and can't get it done.
Calton asked 8/9, 2016 at 9:34

2

Solved

Is there a way that can I make the cap/dot rounded, like in the attached picture? <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke a...
Lisabeth asked 1/10, 2019 at 6:14

4

I am trying to get a circular progress bar with rounded corner as shown below. But I am not able to get the rounded corner so far I am able to get the circular progress bar. I am trying to dra...
Harvard asked 15/4, 2016 at 6:24

10

Solved

I'm working on pretty complex xml drawable and i was wondering if there is any tool/plugins which allow me to preview my drawable ? I'm looking for something similar to the "Graphical layout" tab ...
Electrolysis asked 13/6, 2012 at 15:22

4

Solved

I have this problem, see the trace stack: E/AndroidRuntime(2410): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #5: <bitmap> requires a valid src attribute My xml...
Hokum asked 20/3, 2012 at 14:28

4

Solved

Is there any way we can tint the Drawable used in the TextView? DrawableTint works only on API level 23 and above. Currently I'm using a Vertical Linear Layout to achieve my requirement. <Line...
Watercourse asked 11/1, 2017 at 10:19

3

Solved

I have created chat bubble with drawable which looks fine, now I want to add shadow effect below the drawable so it make 3d effect.I don't want to use 9-pitch image. I just want to know how i can a...
Hentrich asked 14/10, 2014 at 8:29

2

I want a small dot inside a square button , this is what i have tried till now as answered by azizbekian: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas....

3

Solved

I want to make a drawable for my Android button, defined as drawable. I found I could set all the borders by using a rectangle, but I got kinda stuck when I wanted it on three sides. I want for exa...
Derman asked 14/4, 2012 at 0:53

3

I try to create a simple illustration using XML layer-list drawable. I have two shapes, a circle and a rectangle I want a circle not to scale. The following is the layout: <LinearLayout xmlns:a...
Vidette asked 31/3, 2014 at 17:16

3

Solved

how to create android drawable with perfect curved bottom using xml like this : i have tried this xml, but the result didn't perfect <?xml version="1.0" encoding="UTF-8"?> <shape xmlns...
Escheat asked 31/5, 2017 at 2:39

2

Is there a way to make following code compatible with lower API levels: <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="?android:attr/sel...
Smriti asked 14/1, 2017 at 14:1

5

Solved

i want something like following image i tried it using drawable shape <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:...
Naphthol asked 23/10, 2013 at 12:43

2

Solved

I am using the following code to get rounded corners as well as a colored outline: <?xml version="1.0" encoding="UTF-8"?> <gradient android:startColor="@color/white" android:end...
Thorncombe asked 6/11, 2012 at 15:48

2

drawable/information.xml <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="2...
Semirigid asked 25/3, 2016 at 13:28

3

Solved

I have a requirement in my project to draw a circle in runtime dynamically. So for that purpose I am using ShapeDrawable to create circle programmatically, but unfortunately I could not find any cl...

1

Solved

I need to add ripple effect for all controls to add the liveliness to the Application. Since my minimum api level 18, so i can't able to use <ripple> in drawable xml. Also all my controls hav...
Exalted asked 22/5, 2017 at 7:0

2

Solved

I'm trying to make a button with state press and select, I already did the same with tabs and it works but I don't know why here does not work. I have done it like this: button_sel.xml <shape...
Elah asked 18/11, 2012 at 19:8

4

I have a shape drawable that I want to use as a background. I want the shape to be transparent. But so far it's not. How do I do that? Here is what I have: <?xml version="1.0" encoding="utf-8"?...
Radbourne asked 3/7, 2013 at 22:46

1

Solved

I have defined two themes with different primary, primary dark, primary light and accent colors. <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrima...
Ovida asked 6/2, 2016 at 17:41

© 2022 - 2024 — McMap. All rights reserved.