나는 안드로이드 -Sandwich 타입의 특수한 UI에서, 투명 뷰가있는 GLSurfaceView의 작은 GalleryView를 Background View (LinearLayout + 일부 위젯) 위에 놓고 작업하고 있습니다. |Android보기간에 GLSurfaceView를 추가하는 방법은 무엇입니까?
<User>
TOP보기
--- GalleryView
을 : 나는 그것을 설정 생각하고 방법입니다
--- GLSurfaceView (투명 영역 포함)
|
BOTTOM보기
, 그래서 아래 레이어를 볼 수 있지만, (위젯) ---있는 LinearLayout 내가 (사실) setZOrderOnTop를 사용하는 경우; 맨 아래 레이어를 볼 수 있지만 맨 위 레이어 (갤러리)도 Glsurface 뷰 뒤에 있습니다. 스키마와 같이 원하는 뷰를 수행하려면 어떻게해야합니까?
XML 코드 (대신 GalleryView의 AnalogClock와) 더미 예 :
<?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 셋업에 있다고 생각한다. 기본적으로 setZOrderOnTop (true)이 될 때까지는 내가하는 일에 상관없이 투명한 영역을 표시하지 않습니다. 그러나이 설정은 모든면을 맨 위에 놓았습니다 ... 동일한 레이아웃 구성을 갖는 방법과 투명 영역이있는 방법 Glsurfaceview? – prot0n