tags:

views:

116

answers:

1

Hey guys,

Hopefully this will actually make sense and sorry if its a stupid / obvious question. Basically I'm calling the onDraw method like so...

    requestWindowFeature(Window.FEATURE_NO_TITLE); 
    Preview mPreview = new Preview(this); 
    DrawOnTop mDraw = new DrawOnTop(this);  setContentView(mPreview); 
    addContentView(mDraw, new LayoutParams 
    (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

You see I'm drawing it on top of a Camera view and the information being drawn is subject to change. I have a listener setup which will update the variables being drawn at the appropriate time but I now want to "refresh" this draw in that listener. How would I do such a thing?

+1  A: 

It's hard to answer without more code, but I suppose that you should make mDraw a class variable (accessible from lister) and call mDraw.invalidate().

skyman
Thank you, kind Sir :)
Ulkmun