Click here to Skip to main content
12,549,003 members (47,016 online)
Rate this:
Please Sign up or sign in to vote.
See more: Java Mobile Android
There is a great feature for Buttons that allows to set OnClick attribure write directly in xml that works perfectly when I switch between layouts. I look for the same for SurfaceView if its possible at all. Why? - Because touch events not works when I switch to another layout and move back. Thanks.
Posted 22-Dec-12 8:26am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

maybe yout can use the mouseup event. the behaviour is nearly the same and supports the feature you discribe.

hope this helps...
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

SurfaceView[^] does not have that - but it extends View[^], which has some pretty interesting methods for drawing and event processing (keys and touchscreen).
Maybe you can find a hook there. Please read in the documentation, it's pretty good.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161021.1 | Last Updated 22 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100