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. Camcorder Application APIs

Hello to All,

I have never written apps on Android before. No idea of how to even
compile code on Java.
Just got an idea and want to start writing an app.

I went through the SDK but couldn't find what I wanted so asking a
question to the experienced developers community.

I want to write a camcorder application where I want to embed the
graphics as part of my input video stream. Its like on screen
messaging over video but instead of using the text mode, I want the
graphics mode. Basically, whatever I draw on the on-screen surface
using touchpad, that surface content should be logically "AND"ed to
the captured buffer surface and my drawing should be fed to the
encoder engine.

Can you one point out if we have such framework available on android
sdk yet.

thanks

-- 

2. bluetooth test case is failing in android

Hi all,
    iam new to android and I have assigned a work to solve issues on
CTS.
Currently iam working on android GB and I have a doubt regarding
bluetooth testing with CTS.

1. Can we test bluetooth feature with CTS ith single phone ? (I have
only one phone with me)
2. If yes then in my case "testBluetoothFeature" is failing for me
saying that "PackageManager#hasSystemFeature should return true for
android.hardware.bluetooth"
when I debugged that code I came to know that "hasSystemFeature"
function is returing false.
If this feature can be tested with one phone then where do we set
these system features in the code.

Please help me out in solving this issue.

-- 

3. Question about Opengl ES2.0 in 2.3 SDK

4. sipdroid video call over asterisk

5. Emulating native EGL via Java/JNI access?

6. how to auto answer call programmatically

7. back button with activity