Question about Button and SurfaceView

by Karthik Ravi Shankar » Fri, 23 Apr 2010 16:23:56 GMT


Sponsored Links
 Hi,

I am trying to use SurfaceView for an app. But I need to add buttons the
canvas as well. Not able to gather much from Android.developer site. Can
anybody post if they have done it or have some ideas ?

Thanks,
Karthik R
Graduate Student
Computer Science Department
UCLA

--



Question about Button and SurfaceView

by Mark Murphy » Fri, 23 Apr 2010 19:33:21 GMT


 


Step #1: Define a RelativeLayout.

Step #2: Put the SurfaceView as a child of the RelativeLayout.

Step #3: Put the Button as a *later* child of the RelativeLayout.

This will cause the Button to appear to "float" on the SurfaceView. See
this project for an example:

 http://github.com/commonsguy/vidtry 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android App Developer Books:  http://commonsware.com/books 

--


Sponsored Links


Other Threads

1. TranslucentGLSurfaceViewActivity and screen rotation

On my G1 that runs Android 1.6, I enabled screen rotation in the
Settings app. Then, I run the ApiDemos, start the
TranslucentGLSurfaceViewActivity, and rotating the phone. After a few
trials, the TranslucentGLSurfaceViewActivity stops refreshing. I see a
lot of this in adb logcat:

E/libEGL  (13033): call to OpenGL ES API with no current context
E/libEGL  (13033): call to OpenGL ES API with no current context
E/libEGL  (13033): call to OpenGL ES API with no current context
E/libEGL  (13033): call to OpenGL ES API with no current context
E/libEGL  (13033): call to OpenGL ES API with no current context
E/libEGL  (13033): call to OpenGL ES API with no current context
E/libEGL  (13033): call to OpenGL ES API with no current context

Is this a known issue? I am trying to decide whether to use
TranslucentGLSurfaceViewActivity in my app. If it's flaky then I'd
better not use it ...

Thanks

-- 

2. How to know when an ougoing call has been answered

Hi all,
I'm trying to develop an application in Android whose functionality is
to disconnect all outgoing calls and dial a modified number. My
problem is I need to send the actual dialed number to the modified
dialed number as DTMF tones, once after the call has been answered by
the modified number. How to get the status of the answered call ?
Right now I'm using telephony that gives CALL_STATE_OFFHOOK (dialing /
active / hold) states. I need to differentiate between these states.
Any help will be greatly appreciated.

-- 

3. Error while Building the android...

4. Android Layout Editor problem

5. AndAppStore & Archos (Was Is your Android app on Archos Market ?)

6. Increasing the size of status bar

7. emulator's WVGA854 memory size?