Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
356 views
in Technique[技术] by (71.8m points)

android - OnTouchListener, ACTION_UP fires automatically after 30 second timeout

I need the user to be able to touch and hold a button/imageview for a long time (> 30 seconds). unfortunately after ~30 seconds an ACTION_UP is fired automatically. Do you have any idea how i can prevent or bypass this event and keep tracking the users touch?

This is essential for the control of my app.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It happens on my motorola me525 also,only last 20 seconds. I advise you use a layout(for example linearlayout)instead of button or imagebutton layout can be pressed for a long time as you want


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...