onClick listener for Bitmaps

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

onClick listener for Bitmaps

Postby mpathare » Sat Apr 18, 2009 1:52 am

Hello,

I have a custom view in which I override the onDraw method like so

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2.     protected void onDraw(Canvas canvas) {
  3.  
  4.         canvas.drawBitmap(mD.getBackImage(), 0, 0, null);
  5.  
  6.     }
  7.  
  8.  
Parsed in 0.035 seconds, using GeSHi 1.0.8.4


Is there a way I can have the drawn bitmap register clicks? I would like to show a different draw a different bitmap when the one displayed on the screen is clicked.

Thanks.
mpathare
Developer
Developer
 
Posts: 26
Joined: Sat Apr 11, 2009 10:43 pm

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: Google [Bot] and 4 guests