All Questions

98
votes
7answers
73973 views

Set android shape color programmatically

I am editing to make the question simpler, hoping that helps towards an accurate answer. Say I have the following oval shape: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="ht...
108
votes
11answers
105393 views

How to change shape color dynamically?

I have <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#FFFF00"...
13
votes
3answers
13876 views

Image/Graphic into a Shape

I was wondering whether there is any way to convert an image/graphic into a Shape? For example, can I convert the outline of a motorcycle shape into a Shape so I can then use it in Java? I know you ca...
16
votes
5answers
16134 views

How to create a resizable rectangle with user touch events on Android?

I want to create a rectangular shape that will be resized with the touches of the user. Below image is a good example of what i want to do: Is there any example like that? What do I need to study t...
80
votes
7answers
70765 views

Android: Using linear gradient as background looks banded

I'm trying to apply a linear gradient to my ListView. This is the content of my drawable xml: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res...
443
votes
9answers
406486 views

How to define a circle shape in an android xml drawable file?

I have some problems finding the documentation of the definitions of shapes in XML for Android. I would like to define a simple circle filled with a solid color in an XML File to include it into my la...
6
votes
2answers
2401 views

Delphi - moving overlapping TShapes

I've needed own triangle shape so, I inherited my triangle class form TShape and override paint method. Everything works fine, but I need to move this shapes with mouse. I set the method for every sha...
4
votes
1answers
2862 views

How can I smooth my JFrame shape

I gave my JFrame window a custom shape with rounded corners but how can I smooth it(anti-aliasing)
100
votes
8answers
230380 views

How to make gradient background in android

I want to create gradient background as in the picture. but it can't because of the centerColore was spread out to cover bottom and top. How can I make a background like picture below? or How can I m...
19
votes
6answers
22827 views

How do I draw an arrowhead (in Android)?

I'm fairly new to Android and have been toying around with Canvas. I'm attempting to draw an arrow but I'm only having luck with drawing the shaft, none of the arrowhead is working. I have searched a...

Previous Next