Trouble with GLSurfaceView (more info: works if only view, but not as one of several)

by SChaser » Sun, 13 Sep 2009 06:30:41 GMT


Sponsored Links
 More information:

It works if it is the ONLY view on the page, as done by

_surfaceView = new GLSurfaceView(this);
setContentView(_surfaceView);

However, if I make it part of the app framework, it fails as described
above in this discussion:
setContentView(R.layout.main);
_surfaceView = (GLSurfaceView)this.findViewById(R.id.SurfaceView);

See below for main.xml

Odd, eh?

Thanks in advance

---------------------- main.xml ----------------------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android=" http://schemas.android.com/apk/res/android" ;
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">
  <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Put text here" />
  <LinearLayout
    android:id="@+id/LinearLayout01"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
    <Button
      android:text="Solid"
      android:id="@+id/SolidWireButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"></Button>
    <Button
      android:text="Sphere"
      android:id="@+id/SphereButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"></Button>
    <Button
      android:text="Cube"
      android:id="@+id/CubeButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"></Button>

  </LinearLayout>
  <android.opengl.GLSurfaceView
    android:id="@+id/SurfaceView"
    android:layout_height="fill_parent"
    android:layout_width="fill_parent"></android.opengl.GLSurfaceView>
</LinearLayout>



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. problem obtaining android source from windows/cygwin

bash-3.2$ /cygdrive/c/myRepo/repo init -u git://android.git.kernel.org/platform
/manifest.git
Traceback (most recent call last):
  File "/cygdrive/c/myRepo/repo", line 587, in <module>
    main(sys.argv[1:])
  File "/cygdrive/c/myRepo/repo", line 554, in main
    _Init(args)
  File "/cygdrive/c/myRepo/repo", line 173, in _Init
    _CheckGitVersion()
  File "/cygdrive/c/myRepo/repo", line 202, in _CheckGitVersion
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/cygdrive/c/cygwin/lib/python2.5/subprocess.py", line 593, in
__init__
    errread, errwrite)
  File "/cygdrive/c/cygwin/lib/python2.5/subprocess.py", line 1079, in
_execute_
child
    raise child_exception
OSError: [Errno 2] No such file or directory

I wouldn't describe myself as a Python guru.  Has anyone been able to
overcome and fix this problem?

Thanks much.

Paul
--~--~---------~--~----~------------~-------~--~----~

2. RTTI

Does bionic's C++ library support RTTI (eg. for dynamic_cast)?  I did
not see anything in the CAVEATS file about RTTI.  Then again, I didn't
see anything about the lack of STL support either, but found out the
hard way.  Thanks!
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [EMAIL PROTECTED]
website: 

3. API for arbitrary tags in an image file (location etc)?

4. API for getting URL associated with a Geopoint

5. Filesystem on G1

6. Adding views at runtime.

7. Tips for Orientation