현재 iface 라는 레이아웃 위에 opengl 과 pinch to zoom 기능을가진 레이아웃 중첩을 하였습니다.


iface.xml 에서 버튼기능을 추가하게되면 디스플레이에 버튼이 보이긴하나 여기서 onclick 리스너 기능을 넣으면 버튼이 먹히질않습니다.


아마 iface레이아웃이 맨밑에있어서 그런가 하는생각도들긴합니다. pinchtozoom 레이아웃 위에 버튼객체만 가지고있는 레이아웃을


중첩시키려고하는데 어떻게 해야할지 잘모르겠습니다. 또 pinchtozoom 레이아웃위에 버튼레이아웃을 올려놓으면 


버튼객체만 작동되는지 아니면 배경화면 자체때문에 밑에있는 pinchtozoom기능이 작동하지않는건지 궁금합니다.


iface.java


pinchToZoom pinchToZoom;

@Override

public void onCreate(Bundle savedInstanceState){

super.onCreate(savedInstanceState);

setContentView(R.layout.iface);

GLSurfaceView glSurfaceView =(GLSurfaceView) findViewById(R.id.glsurfaceview);

glSurfaceView.setRenderer(new MyRenderer());

//opengl 렌더러 불러오기

pinchToZoom = new pinchToZoom(this);

viewerContainer = (FrameLayout) findViewById(R.id.viewerContainer);

FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(

FrameLayout.LayoutParams.MATCH_PARENT,

FrameLayout.LayoutParams.MATCH_PARENT);

        viewerContainer.addView(pinchToZoom, params);

       //pinchtozoom 레이아웃 중첩

  }

//pinchtozoom 기능을 가진 레이아웃은 잘작동됩니다. 


iface.xml

<FrameLayout  xmlns:android="http://schemas.android.com/apk/res/android"

      android:orientation="vertical"

      android:layout_height="match_parent"

      android:layout_width="match_parent">

<android.opengl.GLSurfaceView

    android:id="@+id/glsurfaceview"

    android:layout_width="match_parent"

    android:layout_height="match_parent"/>

<FrameLayout

android:id="@+id/viewerContainer"

     android:orientation="vertical"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    >

</FrameLayout>

<FrameLayout

android:id="@+id/viewerContainer_btn1"

     android:orientation="vertical"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    >

</FrameLayout>

</FrameLayout>


//버튼객체는 그냥다지웠습니다