Access button from Layout within GlSurfaceView
Clash Royale CLAN TAG #URR8PPP Access button from Layout within GlSurfaceView I am working on Android and have being working on OpenGL ES. I have a xml layout as follows (I have took some things out to show only therelative content: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:ads="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/myText"/> <MyGLSurfaceView android:id="@+id/mySurface"/> Then in my GlSurfaceView I am trying to access the button that is in the same layout. However this is were I am having a problem. I have tried the following: View v = (View) getParent(); myTextViewString = (TextView) v.findViewById(R.id.myText); this myTextViewString = (TextView) findViewById(R.id.myText); and this myTextViewString...