I've had an issue with putting GLSurfaceView between other layouts, as it turned out - it is impossible with GLSurfaceView. So I replaced GLSurfaceView by TextureView, but the issue wasn't solved.
I have such structure in my main layout:
<RelativeLayout android:id="@+id/mainEngineLayout"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@android:color/transparent"
tools:context=".activities.MyActivity">
<com.myapplication.views.openGL.myGLTextureView
android:id="@+id/myGLTextureView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="66dp"
android:layout_marginRight="66dp"/>
<LinearLayout
android:id="@+id/leftButtonsLayout"
android:layout_height="fill_parent"
android:layout_width="66dp"
android:layout_alignParentLeft="true"
android:orientation="vertical"
android:background="#b7b8b0">
<ImageButton android:layout_width="66dp" .../>
<ImageButton android:layout_width="66dp" .../>
</LinearLayout>
<FrameLayout
android:layout_height="fill_parent"
android:id="@+id/rightLayout"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:orientation="vertical"
android:background="#b7b8b0">
<ImageButton android:layout_width="66dp" .../>
<ImageButton android:layout_width="66dp" .../>
</FrameLayout>
</RelativeLayout>
And finally I want to get result like:
The problem is that on some devices I got problem with not displayed TextureView at all, so that there is black field between left and right layouts.
For example it works in my Samsung S3 and emulators and it doesn't work properly on Xperia. I thought the reason can be in different themes, but I set theme in my manifest file like:
<application
android:allowBackup="true"
android:configChanges="orientation|screenSize"
android:theme="@style/CustomHoloThemeNoActionBar"
android:screenOrientation="sensorLandscape"
android:largeHeap="true">
<activity
android:theme="@style/CustomHoloThemeNoActionBar"
where "CustomHoloThemeNoActionBar" parent="@android:style/Theme.Holo.Light"
Could you please advise what can cause such issue?