[android-developers] invalidate() - repaint?

2013-01-09 Thread bob
I made a custom View… basically my own button type that resides in a ListView. I want it to change it's appearance on touch. So, in the touch listener, I call invalidate(). Is this right? It seems to repaint maybe half the time. To get it to work fully, I had to also call invalidate() on

Re: [android-developers] invalidate() painting method

2012-10-14 Thread Adam Ratana
Hi Romain, If you don't mind, would you please describe how the implicit throttling mechanism works, or, point to any documentation on it? I think I am running into this, when my activities start, and the view is being invalidated often, it is throttled it seems for a little while (5-10

Re: [android-developers] invalidate() painting method

2012-10-14 Thread Romain Guy
The throttling is simply a side effect of v-sync. Every paint request is synced with the display's refresh rate. This means you can only draw every ~16 milliseconds (== 60 fps.) Of course, if your application cannot draw in 16 ms you will be synced every 2 frames and you will fall to 30 fps. On

Re: [android-developers] invalidate() painting method

2012-10-14 Thread Adam Ratana
Thank you for the response! I should also say that this only occurs upon creation of the activities, and not when they resume or at any point thereafter. The only thing in common that the various activities have is that they use canvas drawing calls (and draw text), some are not even timed based

[android-developers] invalidate() painting method

2012-10-11 Thread bob
As you may know, you can create a View subclass and then call invalidate() at the end of the painting method. This produces continuous updating. Is this *really really* bad? It sure is attractive due to its simplicity. However, there is no explicit throttling mechanism, which can be

Re: [android-developers] invalidate() painting method

2012-10-11 Thread Romain Guy
There is an implicit throttling mechanism as of 4.1 but even then it's bad. If you don't need to draw, don't draw. You're going to waste battery. On Thu, Oct 11, 2012 at 2:34 PM, bob b...@coolfone.comze.com wrote: As you may know, you can create a View subclass and then call invalidate() at the

[android-developers] invalidate(Rect) and getClipBounds() mismatched

2011-07-11 Thread source.rar
Hi, I am trying to redraw a selected rectangular region within my custom view on a touch event. To achieve this I determine the rectangle around the current touchevent location and invoke invalidate(Rect currRect). Dispalying the values of the rect show that the co-ordinates are for the

[android-developers] Invalidate only one map overlay

2011-07-09 Thread Joan Pujol
Hi, I'm doing my own MyLocationOverlay implementation to bypass extremely slow current position display. The problem that I've is that I want to make a little animation changing the color of the position marker and the only way I know to redraw is to call invalidate o MapView. But that way I

[android-developers] Invalidate and a card flip

2010-01-13 Thread Gregg Reno
I am working on a card game, and using a custom ImageView for the cards. I have an OnClickListener that handles the presses on the cards. What I want to happen is in some cases is: - User presses a face down card - Card displays face up - Wait 1 second - Card displays face down Within the

[android-developers] Invalidate()?...

2009-12-03 Thread Sasikumar.S
Hi, What is the use of Invalidate() in android?... Any one know about these?... Thanks in advance -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

Re: [android-developers] Invalidate()?...

2009-12-03 Thread sathya subbiah
Invalidate is used for updating the View display. Its like refreshing the view. Rgs, Sathya On Thu, Dec 3, 2009 at 5:32 AM, Sasikumar.S sasikumar.it1...@gmail.comwrote: Hi, What is the use of Invalidate() in android?... Any one know about these?... Thanks in advance -- Thanks

Re: [android-developers] Invalidate()?...

2009-12-03 Thread Sasikumar.S
Hi, Thanks for reply... It will refresh onDraw()? On Thu, Dec 3, 2009 at 4:28 PM, sathya subbiah sathya.subbia...@gmail.comwrote: Invalidate is used for updating the View display. Its like refreshing the view. Rgs, Sathya On Thu, Dec 3, 2009 at 5:32 AM, Sasikumar.S

[android-developers] invalidate thumbnails in a GridView

2009-09-01 Thread sdphil
i have a gridview with a bunch of thumbnails in it. when it first gets draw, I put in a default icon. in a separate thread, i retrieve a bunch of images. when all those images are done being retrieved, i'd like to force my gridview to redraw all the thumbnails (or at least those that are

[android-developers] Invalidate() on child view does not work.

2008-04-07 Thread Incognito
This is my problem. I have a main view, a TableLayout view, this view has other views as its children added to it. One of the child views is a custom view, MyView, that I created to draw graphics on it and to receive click events. The other children are all buttons. When I click on the MyView the