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. how to make the app rotate follow the gravity

I have decompile  a apk file using apktools.But the app can fill the
480*800 device.And i want it to work on 800*480 device.But it don`t
rotate when i change the screan orientation,so what can i do?
thanks and sorry for my poor english

-- 

2. [ANN]VTD-XML 2.10

VTD-XML 2.10 is now released. It can be downloaded at
https://sourceforge.net/projects/vtd-xml/files/vtd-xml/ximpleware_2.10/.
This release includes a number of new features and enhancement.

* The core API of VTD-XML has been expanded. Users can now perform
cut/paste/insert on an empty element.
* This release also adds the support of deeper location cache support
for
parsing and indexing. This feature is useful for application
performance
tuning for
processing various XML documents.
* The java version also added support for processing zip and gzip
files.
Direct processing of httpURL based XML is enhanced.
* Extended Java version now support Iso-8859-10~16 encoding.
* A full featured C++ port is released.
* C version of VTD-XML now make use of thread local storage to
achieve
thread safety for multi-threaded application.
* There are also a number of bugs fixed. Special thanks to Jozef
Aerts, John
Sillers, Chris Tornau and a number of other users for input and
suggestions

-- 

3. User interaction with Background applications

4. Cannot have more than one INSTALL_REFFERER receiver in Android Manifest?

5. Does camera support preview formats other than NV21?

6. ListView/ExpandableListView Imageview flicking

7. Render Script samples does't show anything