Tapping texts (Any advice?)

3 replies [Last post]
MichaelAssadi
User offline. Last seen 2 days 13 hours ago. Offline
Joined: 20 Jan 2011

Hello,

I have an app where the user is constantly tapping on texts, the texts are buttons. When tapping the texts on the simulator it works fine, because of the precision. But when i put the app on my device and test it, it's very hard to tap the text (the text is a number). It takes me about 5 times till the touch event works.

Is their any way to enlarge the touch boundary of the text? Because it just doesn't work...?

Any advice?

Thanks. If you have any questions concerning my answer please ask.

- Michael

Replies

croisened's picture
croisened
User offline. Last seen 2 days 22 hours ago. Offline
Joined: 26 Mar 2011

You could put an invisible rectangle over the top of your text and handle the tapping of that instead.

--Croisened

MichaelAssadi
User offline. Last seen 2 days 13 hours ago. Offline
Joined: 20 Jan 2011

Yeah, that's what I was thinking... I just was wondering if their was a better way to do it.

But, Thanks for your response!

- Michael

Satheesh's picture
Satheesh
User offline. Last seen 5 hours 2 min ago. Offline
Joined: 25 May 2011

You could use the button widget for your button. Set the button label as your text and the alpha property of both the defaultColor and the strokeColor as 0. That way you'll have the text with the button's boundaries.

Hope that helps!

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.