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. Theme.Dialog - Remove Title Area?

I have an activity that is using android:theme="@android:style/
Theme.Dialog", and I want to get rid of the black line (looks to be
about 20dp height) where the Dialog title would normally go. I just
want the content area of the Dialog.

Any ideas?

-- 

2. How to keep a service running to listen for incoming and outgoing calls

Hi, how should I create a service that would keep on running in the
Background and listen for incoming and outgoing calls? I don't want
the service to die at any point in time. I have created a Broadcast
Receiver in my service class that is set for
ACTION_PHONE_STATE_CHANGED action. In my BroadcastReceiver, I have set
up a PhoneStateListener that would listen for changes in phone states.
Is this the right approach? Thanks.
David

-- 

3. language support in android -----tamil fonts

4. How to check for existence of 3rd party library during installation?

5. Get count of email messages in Email app

6. button focus

7. Live Folders Access