Hmm. Would you know how to avoid issues with threading and this error: 03-03 01:01:11.247: ERROR/AndroidRuntime(20853): android.view.ViewRoot $CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
I get this problem when trying to modify the views I add. On Mar 2, 2:53 pm, Mark Murphy <[email protected]> wrote: > Ozymandias wrote: > > Is it possible to do this? > > > There are Toasts, which are great for short information popups. They > > can't seem to receive touch events as well as requiring hacks to keep > > showing permanently. > > > There are Dialogs, which are great for...dialogs. They can receive > > touch events, but steal focus from the view beneath them. > > > I want a way to display UI elements over my game's GLSurfaceView which > > are created in XML like a normal view. I need them to receive touch > > input if it's on them, without blocking touch input that's not on > > them. > > > Does anyone have any ideas? > > Step #1: Put the GLSurfaceView as the first child of a RelativeLayout > > Step #2: Put the other widgets you want as later children of the same > RelativeLayout > > Step #3: There is no step #3 > > The widgets should appear to float over the SurfaceView. They are part > of your UI and will behave no different than widgets anywhere else > (e.g., they'll receive click events). If you don't want them to steal > focus, make them non-focusable (I think there's an attribute or setter > for that). > > Note that I have used this technique with a regular SurfaceView, and I > am assuming it also works with GLSurfaceView. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > _Beginning Android_ from Apress Now Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

