Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- this.context = getActivity();
- View rootView = inflater
- .inflate(R.layout.opengl_layout, container, false);
- swipeLayout = (SwipeRefreshLayout) rootView
- .findViewById(R.id.swipe_container);
- glView = (MyGLSurfaceView) rootView.findViewById(R.id.surfaceView1);
- //glView = new MyGLSurfaceView(getActivity());
- GLlayout = (RelativeLayout)rootView.findViewById(R.id.upperView);
- // getActivity().setContentView(glView);
- touchStart = new PointF();
- glView.setRenderer(MenuActivity.renderer);
- //GLlayout.addView(glView);
- scaleGestureDetector = new ScaleGestureDetector(getActivity(), new ScaleListener());
- swipeLayout.setOnRefreshListener(this);
- swipeLayout.setColorScheme(android.R.color.holo_orange_dark,
- android.R.color.holo_red_dark,
- android.R.color.holo_orange_light, android.R.color.holo_red_light);
- return rootView;
- <?xml version="1.0" encoding="utf-8"?>
- <ScrollView
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
- <RelativeLayout
- android:id="@+id/upperView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:padding="20dp" >
- <Button
- android:id="@+id/button1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:text="Button" />
- <Button
- android:id="@+id/button2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:text="Button" />
- <openGlSurface.MyGLSurfaceView
- android:id="@+id/surfaceView1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/button1"
- android:layout_alignRight="@+id/button2"
- android:layout_below="@+id/button1" />
- </RelativeLayout>
- </ScrollView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement