I am wanting to create help overlays like the ones you see when ICS loads for the first time or in apps like ES File Explorer or Apex Launcher (there are more, but I can't think of them right now). Is this just a relative layout with one view sitting on top of the other? I haven't been able to find any sample code for doing such a thing. Anyone know how this is done or have any ideas?
Let's assume you ordinarily would call
setContentView(R.layout.main), but on first run, you want to have this overlay.
Step #1: Create a
FrameLayout in Java code and pass that to
Step #2: Use
LayoutInflater to inflate
R.layout.main into the
Step #3: Use
LayoutInflater to inflate the overlay into the
Step #4: When the user taps the button (or whatever) to dismiss the overlay, call
removeView() to remove the overlay from the
Since the overlay is a later child of the
FrameLayout, it will float over top of the contents of