-1

I found the following answer

Draw SurfaceView from layout xml

It works GREAT. However,I cannot figure out how to call a method/function from the extended SurfaceDraw class.I couldn't figure out how to ask a question of a particular answer either.

It seems like the following code should work. However, no matter where I put it it generates a null value so i can't make a call to a method/function.

DrawingSurfaceView drawingsurface = (DrawingSurfaceView)findViewById(R.id.DrawingSurfaceView);

DrawingSurfaceView.MyMethod();

I am so very close to accomplishing my goals. Any help with this is issue is greatly appreciated.

I got it. I will post an anser when the system lets me.

Community
  • 1
  • 1

1 Answers1

-1

I moved:

DrawingSurfaceView drawingsurface = (DrawingSurfaceView)findViewById
  (R.id.DrawingSurfaceView);

to onCreate() and it started working.

Marvin Pinto
  • 30,138
  • 7
  • 37
  • 54