Question about Button and SurfaceView

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

Sponsored Links

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 ?

Karthik R
Graduate Student
Computer Science Department


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: 

Mark Murphy (a Commons Guy)  | 

Android App Developer Books: 


Sponsored Links

Other Threads

1. Setelah Rooted bgmn cara aktifin Market Enabler nya ?

Lapor : Ane sudah berhasil Rooted X8 ane pake SuperOneClick.. step step nya
bisa di lihat di :
terus pas ane liat di screen hh ane ternyata ada icon ninja bawa senjata
laras panjang tuch..
nah setelah rooted done.. cara untuk aktifin Market Enabler nya gmn ya?
Aplikasi apa yg mesti di install.. mungkin RR, Suhu/i ada yang mau Share?
Terimakasih banyak sebelum nya.

Powered by AHA - EVDO

2010/11/20 imam maulidin <>


2. [WTA] unlock with root

Dear rr,

Mau tanya lagi nih... 
1. Apakah rooting itu sama seperti install ulang-kah atau jailbreak-kah?
2. kalo unlock htc hero sprint cdma bisa pake cara rooting atau harus pake 

Jujur, saya masih baru banget dalam dunia per-droid-an jadi harap maklum kalo 
banyak tanya :)

Thanks a lot... :)

"Excellence is not an act but it is a habit"

- Paskia Englishianto -


3. Tutorial dan tools untuk Inject Droid 2

4. What Intent for Browser without URL

5. [share] Bersama Android Memburu Makhluk Halus di Lawang Sewu

6. 512x512 high res icon required?

7. resetting the ListView after Adapter's data was changed.