私はAndroidの特別なUIに取り組んでいます - サンドイッチタイプ、GLSurfaceViewの小さなギャラリービュー(透過領域付き)をバックグラウンドビュー(LinearLayout +ウィジェット)の上に配置しました。これは私がそれをセットアップすると思っています方法です:Androidビュー間でGLSurfaceViewを追加するには?
<User>
TOPビュー
--- GalleryView
|
--- GLSurfaceView(透明領域あり)
|透明な領域に黒の背景を持っているGLSurfaceView通常モードで
---(ウィジェット付き)のLinearLayout
底面図
ので、私は下の層を見ることはできませんが、私はsetZOrderOnTop(true)を使用する場合、最下層を見ることができますが、最上層(ギャラリー)もGlsurfaceビューの後ろにあります。スキーマのように希望のビューを達成するにはどうすればよいですか? (AnalogClock代わりのGalleryView付き)
XMLコードダミー例:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#920000"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/LinearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right" >
<AnalogClock
android:id="@+id/analogClock2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<com.test.CustomGlView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gl_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<AnalogClock
android:id="@+id/Gallery_dummyview"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
私はあなたが私たちから欲しいものを得られませんでしたか?あなたはXMLレイアウトを書くのに助けが必要ですか? –
私は問題がレイアウトではなく、GLSurfaceView settupであると思います。デフォルトでは、私はsetZOrderOnTop(true)ではない限り、私が何をしていても透過領域を表示しませんが、この設定は一番上にサーフェスを置いています...同じレイアウト構成を持ち、透明領域を持つ方法Glsurfaceview? – prot0n