How to use Graphics.VCENTER|Graphics.HCENTER

by manohar » Wed, 24 Jun 2009 20:11:37 GMT


Sponsored Links
 Hi All

I am porting a game from J2ME to Android. In J2ME the code is as
follows
g.drawImage(image,x,y,Graphics.HCENTER | Graphics.VCENTER)

In android i have written has

g.drawBitmap(image, x, y, paintObject);

Here i do not have a ooption to specify the anchor position.  Can any
one pls tell me how to specifiy anchor position in andorid. By defult
in andorid it is taking as Graphics.LEFT | Graphics.TOP.

pls help
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. SyncML on android

Hi all,

    I want to implement SyncML on android. I want to sync my contacts
and calendar on my server.Is it possible in android ?
if yes then how ?. I am waiting your response.

Thanks,
Gulfam
--~--~---------~--~----~------------~-------~--~----~

2. Why drawing in View.onDraw not take effect, but does in ViewGroup.dispatchDraw

HI buddies,

I'm trying to create a custom widget which looks{*filter*} HTML table.
I chose to derive from TableLayout, which is the subclass of ViewGroup
and View.

What's confusing me is that the drawing I put into my override of
View.onDraw did not take effect, until I moved the codes to the
override of ViewGroup.dispatchDraw.

I know dispatchDraw is a good place to draw something, but I'm just
wondering why there's such difference in my practice?

Thank you in advance.

FBear
--~--~---------~--~----~------------~-------~--~----~

3. Portrait/Landscape mode

4. Dev Phone can not see paid apps using the 1.1 holiday release

5. Getting Stack overlfow error, pls help

6. How to get the account infomation from user

7. Troubles with SurfaceView's surfaceCreated/Destroyed