Why does getPadding() of NinePatchDrawable throw a NullPointerException?

by Romain Guy » Tue, 13 Oct 2009 06:02:16 GMT


Sponsored Links
 NinePatchDrawable tagBalloon9pDrawable = new NinePatchDrawable(tagBalloon9p);

this creates a NinePatchDrawable with a null padding. That's why you
get an NPE. You need to specify the padding.






-- 
Romain Guy
Android framework engineer
romain...@android.com

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

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



Why does getPadding() of NinePatchDrawable throw a NullPointerException?

by Romain Guy » Tue, 13 Oct 2009 06:02:56 GMT


 BTW, why are you creating the NinePatchDrawable yourself if you are
creating it from a resource anyway?







-- 
Romain Guy
Android framework engineer
romain...@android.com

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

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


Sponsored Links


Other Threads

1. Garbage Collection Infinit Loop: clamp GC FOR MALLOC Grow heap loop

Basically this stops me from properly implementing a background file
upload.
Anybody has an idea what is going on here?




-- 

2. Is it normal that a real device fps is much different then emulator?

Hi everyone,
I developed a game. On the emulator (not froyo) I am getting like less
than 10 fps.
But on my Nexus One with froyo I am getting 50 fps.
Is this normal? Which one should I trust, I want my game to perform
good on phones without froyo
Thanks.

-- 

3. Moto Droid 2nd & New

4. Android developer in Brazil

5. Can load html from assets but loading JS, CSS from within that HTML is another story ...

6. Calculating Hash Value

7. CTS install_failed_insufficient_storage error