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. data in onPictureTaken always null for raw picture

I'm attempting to obtain raw picture data from the camera.  According
to the Javadocs it can be obtained via the callback passed to
camera.takePicture(null, callback, null).  However, the array passed
to the callback is always null.  I've checked permissions, examined
the logcat, registered a callback for errors, tried various image
sizes and format, all to no avail.  I've also seen other posts
mentioning it, but never an answer to the question.

Does anyone know, are we doing something wrong, or is this feature
just not implemented by Android in its current form?
--~--~---------~--~----~------------~-------~--~----~

2. TouchEvent and ScrollView

Hi All
I am Developing one application when i am trying to Drag Component
from top to Bottom in ScrollView . component move up to end of the
Screen and not move  the below the Screen when i am dragging the item
i am using Absolute Layout for the drag and Drop and touchEvent
listener for move the component plz help me Thanks

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

3. App Widget and Orientation Changes

4. building android projec

5. building android application using "semut"

6. I need my google contacts synced

7. Any way to measure network traffic ?