You are a life saver. I got this working. I had to use java to build the core layout because I couldn't get it to work in XML, but after that I can load up any XML views I want.
On Mar 2, 2:53 pm, Mark Murphy <mmur...@commonsware.com> 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en