0

my question is not only about onTouch events but about every method I can use to recognise a touch on certain areas of the screen.

Right now, I have a "background" image, which I use as layout that contains 2 "buttons": Start and Options as you can see here:

enter image description here

Ok, what I want to know is which is the best way to identify when are the user touching each button. By the way, should be nice also some info about how to deal with the different screen sizes.

Lots of thanks.

PD: seems I didnt explain it well. they are not "Android buttons" theirselves. The background is a whole image, where you can find 2 "buttons", but they are a part of the image. Thats because I need to know how to do this

4

2 回答 2

0

为什么要在整个屏幕上设置 touchListener 并找到按钮?..您可以简单地在两个按钮本身上设置 OnClickListener 或 onTouchListener..

于 2013-05-08T17:01:31.170 回答
0

我认为您缺少一些基础知识,因此我建议您学习教程
作为对您问题的直接回答,您可以从教程中查看此页面。

于 2013-05-08T16:54:32.343 回答