Multiple shapes on one Drawable

by Jose de Paula Eufrasio Junior » Tue, 28 Apr 2009 10:10:19 GMT


Sponsored Links
 Hello.

I need to put 3 shapes (circles) on a drawable. I will create various
drawables with different colors and use it on an Animation, the
problem is I cant find a way to (programatically or XML) add various
shapes to a single drawable.\

Any possible solution is welcome.

-- 
Jos de Paula Eufrsio Jnior (coredump)
MCSO, GRC Professional
 http://core.eti.br 

--~--~---------~--~----~------------~-------~--~----~



Multiple shapes on one Drawable

by nEx.Software » Tue, 28 Apr 2009 10:30:38 GMT


 I'm not positive but I believe the way to do this in XML is to use a
layer-list tag. I'll check it but in the meantime you want to look
into that. In code I believe this equates to a layerdrawable?

On Apr 27, 7:10pm, Jose de Paula Eufrasio Junior


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Multiple shapes on one Drawable

by Jose de Paula Eufrasio Junior » Tue, 28 Apr 2009 10:32:18 GMT


 On Mon, Apr 27, 2009 at 11:30 PM, nEx.Software



Tried a LayerDrawable without much luck. Unless I am doing something
really stupid with it. The lack of code samples get to my nerves
sometimes :)


-- 
Jos de Paula Eufrsio Jnior (coredump)
MCSO, GRC Professional
 http://core.eti.br 

--~--~---------~--~----~------------~-------~--~----~



Multiple shapes on one Drawable

by Dianne Hackborn » Tue, 28 Apr 2009 11:01:42 GMT


 How about just writing your own Drawable subclass?

On Mon, Apr 27, 2009 at 7:32 PM, Jose de Paula Eufrasio Junior <






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~



Multiple shapes on one Drawable

by Jose de Paula Eufrasio Junior » Tue, 28 Apr 2009 11:10:20 GMT


 


Erm... What? :P
Sorry I am kinda green on some java stuff. I will check out how I can
do that. Thanks.

-- 
Jos de Paula Eufrsio Jnior (coredump)
MCSO, GRC Professional
 http://core.eti.br 

--~--~---------~--~----~------------~-------~--~----~



Multiple shapes on one Drawable

by Jose de Paula Eufrasio Junior » Wed, 29 Apr 2009 02:10:05 GMT


 Ok I almost got it. I tried this code:  http://pastebin.com/m72209427 
but my red_circle overlap, so I got only one when I run the Activity.
I also tried this XML:  http://pastebin.com/m43a2c42d but I got one 
circle stretching, one normal. I tried to set android:bottom and that
did not work.

Soo, what the catch I am missing? :)


-- 
Jos de Paula Eufrsio Jnior (coredump)
MCSO, GRC Professional
 http://core.eti.br 

--~--~---------~--~----~------------~-------~--~----~



Multiple shapes on one Drawable

by Jose de Paula Eufrasio Junior » Wed, 29 Apr 2009 23:57:12 GMT


 aFTER more testinmg: and not getting to show one drawable lowe then
other I am thinking that the LayerDrawable does not allow it. Am I
right?

Like:

------------> Layer
Draw1
Draw2
Draw3
-------------> end layerr

and not

-------------> Layer
Draw1, Draw2, Draw3
-------------->

-- 
Jos de Paula Eufrsio Jnior (coredump)
MCSO, GRC Professional
 http://core.eti.br 

--~--~---------~--~----~------------~-------~--~----~



Multiple shapes on one Drawable

by Jose de Paula Eufrasio Junior » Thu, 30 Apr 2009 01:43:07 GMT


 Woot!

Hey Dianne, thanks for the tip. I created a Custom drawable class with
a for loop and using canvas.drawcircle. It's fast and very easy to
use.

Not bad for a python programmer that started writing java/android apps
last friday :)

-- 
Jos de Paula Eufrsio Jnior (coredump)
MCSO, GRC Professional
 http://core.eti.br 

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Can Java code be replaced with XML

Hi All,

I have an activity with 50 buttons. Want to avoid writing 50 switch cases
for onClick listener events.

Is their a way to map the buttons with its respective loading of UI in XML
format and avoid writing Java code.

Any pointers would be appreciated.

Thanks,

- Bhavya

-- 

2. ERROR IN "C:\Users\lenovo\Desktop\android-sdk_r06-windows\android-sdk-windows>>SDK Setup.exe"

Thank you very much for your advice but I don't know how can I do what your
advice.   :s






> > 

3. Request advise in activate a button from a popup screen....

4. Pub/sub how to

5. RTP payload redundency( rfc 2198) in android rtp stack: PJMEDIA

6. Android VNC server

7. Pending Intent Problem