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. USB notification issue with Android Froyo and 2.6.35 kernel

Hi All,

I am facing one issue with Android Froyo and 2.6.35 kernel in getting
USB notifications. When I connected USB cable with our device, Windows
Host PC detetecd composite device ADB+UMS, but on device there is no
notification (normally two notification "usb connected" followed by
"usb debugging connected" suppose to come.).

When traced back issue i found logcat is showing one warning as "W/
Vold No UMS switch available". In 2.6.32 kernel's f_mass_storage.c
file fsg_dev structure contains one member as switch_dev and this
switch device is registered in mass_storage_bind_config function, but
I found that on 2.6.35 kernel's f_mass_storage.c file is not
registering switch device and beacause of which in Android Froyo's /
system/vold/main.cpp while opening switch device for UMS it failed and
thus failed to show notification.

So I want to know why switch device registration is removed from
f_mass_storage.c file as without it Android Froyo is not able to
display connection notifications.


Thanks,
Pankaj

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: 

2. Working MSM7201 usb host driver v2



I have just gotten this working on a tmo mytouch sapphire 32B with a
cyanogen 2.6.29 kernel patched with a modification of Andrew's code.

This verifies that the hardware is host capable, with a y cable for
power dmesg shows the names of peripherals plugged in.

There was some sort of bug with one of the private data structures
getting wiped out; I did a very ugly temporary fix to get past that.

Many thanks to Andrew for the pioneering work and off list support.

Chris

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: 

3. How to load a url in webview through a socks 5 proxy

4. Airplane mode

5. Upload Images to server

6. sdcard MEDIA_MOUNTED, File.canRead = true, File.canWrite = false

7. Not able to set APN with 2G network, but works with 3G