I wouldn't do anything except set a flag indicating you need to add
text in the onTouch method and invalidate what you need to redraw.
Then, in onDraw, you'll draw on the Canvas with a TextPaint. Read up
on those classes in the documentation available on
developer.android.com for more info.
Regards,
- Mike
On Feb 9, 2:22 am, mithun wrote:
> Below is part of the code of onTouch
>
> if(event.getAction() == MotionEvent.ACTION_DOWN){
> for(int i = 0; i < 2; i++){
> if(tiles[i].getBounds().contains(x,
> y) == true){
>
> //Here i need to add
> text in this rectangle!
>
> break;
> }
>
> }
> invalidate();
> }
>
> Thank you in advance.
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en