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. [WTShare] Turut berduka buat X10 users

Bener2 nih SE.. kyknya males banget devs-nya..
Padahal pas presentasi di SenCy kesannya bakal di-support terus.. -____-"

http://www.engadget.com/2011/01/06/sony-ericsson-no-os-updates-for-xperia-x10-beyond-android-2-1/

 *Sony Ericsson: no OS updates for Xperia X10 beyond Android 2.1, it's
better than 2.2 anyway *
 By Vlad Savov <http://www.engadget.com/editor/vlad-savov>
<http://www.engadget.com/editor/vlad-savov/rss.xml> posted Jan 6th 2011
10:59AM

<http://www.engadget.com/2011/01/06/sony-ericsson-no-os-updates-for-xperia-x10-beyond-android-2-1/>
The farce that has been Sony Ericsson's bungled,
delayed<http://www.engadget.com/2010/10/29/android-2-1-starts-rolling-out-to-sony-ericsson-xperia-x10-line/>,
and deservedly maligned Android upgrade
story<http://www.engadget.com/all/xperiax10,android>for the Xperia
X10 
family<http://www.engadget.com/2010/05/05/sony-ericsson-x10-family-to-get-android-2-1-in-q4-2010/>is
coming to a fittingly silly end. Questioned by
*Android Community* on the possibility of a Froyo (Android 2.2) upgrade for
its initial set of Android handsets, the SE team has just come out and
admitted that there'll be no future OS upgrades, at least in terms of
Android iterations. The X10, X10 Mini and X10 Mini Pro are not being
abandoned, not at all, but the only software enhancements you can look
forward to will come directly from Sony Ericsson. The company hardly sees
that as a bad thing, however, judging by a recent tweet announcing its
belief that an SE-customized Eclair tastes better than Google's untouched
Froyo<http://www.engadget.com/2010/05/21/android-2-2-froyo-everything-you-ever-wanted-to-know/>.
We'd protest, but what's the use?

-- 
===============
"

2. [WTS] jual kartu 3unlimited bawaan journey

as subject saya mau coba jual kartu 3unlimited bawaan journey, sayang gak
kepake, udah seminggu diaktifin,

saat ini kartu udah saya buka.

yang minat bisa japri ke albaidi...@gmail.com

terima kasih

-- 
===============
"

3. Android harga gila/spesial hanya 3 hari buktikan!!!

4. Android NDK

5. Next Xperia-Droid : ARC

6. [Wts] htc desire HD, motorola defy, Nexus One 2nd, Samsung Nexus S

7. Downloading file and asynctask opinion needed