Draw outside the onDraw() function

by Rahul Garg » Thu, 13 May 2010 19:36:30 GMT

Sponsored Links
 Hi ,
        I want to change the particular portion of my canvas by
clicking the menu button. but as onKeyDown() function is called after
the onDraw() function, I am unable to modify my canvas. what should i


Draw outside the onDraw() function

by TreKing » Thu, 13 May 2010 23:40:12 GMT


Can't you call invalidate or postInvalidate or something to trigger another
draw call?

TreKing - Chicago transit tracking app for Android-powered devices


Sponsored Links

Draw outside the onDraw() function

by Rahul Garg » Fri, 14 May 2010 10:54:11 GMT

 No that is also not working .....


Other Threads

1. Preventing WakeLock Under-Locked exception

I'm trying to implement a times WakeLock in my Application, so this is
not a Service.

I want the wakelock to simply prevent screen dimming for 3 min.
Looking through the docs, this seems simple enough, but I seem to
randomly encounter a Under-Locked exception that I cannot pinpoint.

Here is my WakeLock-related code:

in onCreate:
        PowerManager pm = (PowerManager)
        mWakeLock =
pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, TAG);
        // Adjust time to include user's setting
        int timeout = WAKELOCK_TIME -
Settings.System.getInt(getContentResolver(), SCREEN_OFF_TIMEOUT, 0);
        if (timeout > 0) {

in onDestroy:
        if (mWakeLock != null && mWakeLock.isHeld() == true) {
                        try {
                                } catch (Exception e) {
                                        // TODO Auto-generated catch block


As you can see, I wrap the release and try to only execute it when
necessary as a clean up only.  I'm assuming that since I'm aquiring
with a timeout, the PowerManager will handle the release in most cases
when the timeout expires.

I don't have a copy of the logcat at the moment, but what seems to
happen is I get the Under-Locked exception randomly, and at random
times (it's not always when WAKELOCK_TIME elapses).  The strange thing
is that the exception does not point to my code - all the entries
point to "internal" Android code.

It's hard to find examples of other people using aquire with timeouts.

Any ideas what I could be doing wrong here?


2. Fwd: (Sold) WTS-HTC Hero 2nd mulus sekali

Update aja,sudah sold ke bos yang baik banget di perkantoran daerah
gatot subroto.

Thanks mods buat jalumnya.

---------- Forwarded message ----------
From: dody hindratno <dhindra...@gmail.com>
Date: Sun, 27 Dec 2009 07:51:49 +0700
Subject: WTS-HTC Hero 2nd mulus sekali
To: gadtor...@yahoogroups.com

Mods numpang jalumnya.

Berhubung butuh dana cair,mau dilepas aja HTC Hero nya dengan spec :

HTC Hero warna coklat
Kondisi mulus sekali (tidak ada lecet sama sekali),tangan pertama,beli
dari baru dari bos HM di milis ini.
Ada GMS,full applikasi.
Lengkap sesuai barunya
Harga : 5,1 jt

Kalo gak nawar bonus memory card 8GB + silicone case 2 buah

Minat silahkan japri ke dhindra...@gmail.com


Sent from my mobile device

Sent from my mobile device

"Indonesian Android Community [id-android]" 

3. Join The best Google Group With Over 640 Members Worldwide

4. Fwd: how can I enable the speakerphone when a call is in progress.

5. ItemizedOverlay Adding Items and onTap Issue

6. Iseng iseng part 2

7. Does Android support XGA (1024x768) resolution ?