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. Help: Data SMS tiba-tiba hilang

Minta tolong,

Data SMS gua tiba-tiba lenyap tanpa bekas. yang ada hanya beberapa sms
tahun 2010 di simcard.
Kejadiannya saat ada sms masuk dan tiba-tiba blank, tidak tau salah dimana.

HH : Desire HD
os : Revolution ANdroid HD 2.0.7

kira-kira salah dimana ya?

mau restore yang 2 hari lalu ada juga di mybackup pro ada juga tapi yg
2 hari lalu.

salam,
Hermanto

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

2. integrate the H/W decoder into stagefright

hi,

I have quickly looked Stagefright source in Gingerbread. It seems that
Stagefright uses codecs in either OMXCodec or OMX plugins.

I have a H/W AVC decoder derived from OmxComponentVideo and registered in
pv_omxcore.cpp in Froyo OpenCORE. What is the best/quick way to integrate
the decoder into Gingerbread Stagefright?

Thanks.

-- 

3. why samsung and qcom do not implement audio omx section in /hardware

4. Pilih Mana? Android Atau iPhone? (via gopego.com)

5. reset market license

6. Confusion over MediaPlayer Framework on GingerBread and Apple's HTTP Live Streaming Support

7. Considered SOLDFw: Wts droid 2 mind condition