invalidate

Android: How to get a custom view to redraw partially?

I have a custom view that fills my entire screen. (A piano keyboard) When a user touches the key, it causes invalidate() to be called and the whole keyboard gets redrawn to show the new state with a touched key. Currently the view is very simple, but I plan to add a bit more nice graphics. Since the whole keyboard is dynamically rendere...

How to properly invalidate an NSTimer

I've got an iPhone app with an NSTimer called pressTimer that goes off every time someone touches this button. The problem is they touch the button a lot, and I want the timer to stop when they lift up their finger. So I declared pressTimer in my .h and synthesized it in .m then assigned and started it on the TouchDown action I created. ...

Why Invalidate() should be called outside the control then it can work ?

I am using C# + winforms to develop software. I have a UserControl which contains several DataGridView datagridview1.datasource = from p in dc.doctor select p; I use linq to sql to populate the dataGridView with dataSource, because I need to refresh the datasource to update the records, so I create a new dataContext and assign the d...

Invalidating an NSTimer?

If I have an NSTimer that starts in viewdidload, where is the proper place to invalidate it when leaving that view? Is it also necessary to release it as well? ...

Android refresh StateListDrawable problem

Hi all, I have a strange problem with StateListDrawable or maybe (probably) I'm missing something. I created a test application for it and the same problem occurs. So, this is my StateListDrawable resourse in file test_selection.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/androi...

Android - Simple View Refresh

Hi there, I don't think my future lies in Android development, as I am consistently failing at the simplest things... I've got a button with the label "Game Slot 1". When the user clicks it, I succesfully take them through a couple of activities in which they create a new character. I save the game name in an SQLite database, and the...

NSTimer not stopping

I have a Class with a NSTimer *myTimer; variable. At some point I do: myTimer = [NSTimer scheduledTimerWithTimeInterval:20 target:self selector:@selector(doStuff) userInfo:nil repeats: YES]; further, I have a method: - (void)doStuff { if(myTimer) { //do stuff } } and I stop my timer when the class is released through: ...

checking if android list item (Drawable) is still visible.

Let's assume i got a list of ImageView and TextView with LinearLayout. Now i'm using simple ArrayAdapter extension that gets Strig[][] as items which is an array of double strings (each entry contains String[2] where the first string is a uri to the image and the second one is the text. i override getView to display the image and text , ...

Delphi 6 - Bitmap only updates when owner window requires a repaint when using the Graphics32 library

I have an application that creates 3D motion on a TPaintBox Canvas using native Delphi code. In the old code I rendered the 3D image to a temporary TBitmap on a Timer event. In the TPaintBox OnPaint() event I would BitBlt() the temporary TBitmap the TPaintBox's Canvas. This approach worked fine but the motion was jerky. Because I was...

How to properly invalidate JSP session?

So here is the problem. When a user logs out of my website, they can still hit the back button and continue using the site. To keep track of whether the user is logged in or not, I created a session attribute "isActive". The attribute is set to true when the user logs in, and is (redundantly) removed right before the session is invalidat...

what parameters to pass to invalidate(left, top,right,bottom) for google map on android ?

Hi there, what parameters do I pass to this function ? invalidate(left, top, right, bottom) for use with google map on android ? thanks - ahsan ...

problem with calling invalidate in async task thread in Android !

Hi Everyone, I am trying to call the invalidate() from asyntask thread. I am getting this error : 10-18 15:14:30.469: ERROR/AndroidRuntime(889): Caused by: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. The line I have used is : mainClass.myMapV...