Log in or register to post comments

add a SlidingDrawer ?

July 27, 2012 - 1:59am #1


I would like to add a SlidingDrawer (android.widget.SlidingDrawer) to ImageTargets sample, but i do not really know how to do this, because I dont know where is the current View (to modify the.xml to add a SlidingDrawer).

And the problem is that we cannot add a SlidingDrawer with Java code only.. if any can help me, i would be glad to ;)

Thanks in advance,

PS: i don't think it's a big problem, but i just can't find out on forums how to do this...

add a SlidingDrawer ?

July 30, 2012 - 1:14am #3

Thanks, it worked !

add a SlidingDrawer ?

July 27, 2012 - 9:41am #2

You'll want to add this to its own View and overlay that on the mGLView.

For example, let's say that you've defined an new View named 'overlay'. You'd first inflate this, and then add it after the mGLView.

using ImageTargets.java


inflate it in an in a method called w/ initialization ..

        LayoutInflater inflater = getLayoutInflater();
        mOverlayView = inflater.inflate(R.layout.overlay, null);



then add it in updateApplicationStatus..


                mSplashScreenRunnable =
                    new Runnable() {
                        public void run()
                            // Hide the splash screen
                            // Activate the renderer
                            mRenderer.mIsActive = true;
                            // Now add the GL surface view. It is important
                            // that the OpenGL ES surface view gets added
                            // BEFORE the camera is started and video
                            // background is configured.
                            addContentView(mGlView, new LayoutParams(
                            addContentView(mOverlayView, new LayoutParams(
                            // Start the camera:

Log in or register to post comments