Help me to achieve view port Transparent to see other content of the parent child components of activity layout, behind of JME fragment container?
I don’t understand what you’re trying to do, but it sounds like you might want to invoke ViewPort.setClearFlags()
.
If that doesn’t help you, please tell us more. What’s a “parent child component”? What’s an “activity layout”? And what’s a “fragment container”?
In Android, we load “AndroidHarnessFragment” into container or view of Activity layout(parent layout or view).So, if we want see other view content or child view components(like TextView, ImageView) of Activity layout behind container.
Use RelativeLayout
as a parent layout .
https://developer.android.com/guide/topics/ui/layout/relative
I think he is talking about Android views (android components) with each other relationships , like overlaying a background Imageview behind some Buttons , so he want to use some Android views in front of a jme Renderer(AndroidHarnessFragment).
Yes, your right
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".JMESurfaceViewExampleActivity.JmESurfaceViewExample">
<!-- JmE Surface View -->
<com.scrappers.superiorExtendedEngine.jmeSurfaceView.JmESurfaceView
android:id="@+id/jmeSurfaceView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<Button
android:id="@+id/test"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_alignParentEnd="true"
android:layout_marginEnd="7dp"
android:textColor="@color/pureWhite"
android:textAlignment="gravity"
android:gravity="top|center"
android:background="@mipmap/xmas"
android:text="@string/test_1" />
<!-- xml example of GameStick-->
<com.scrappers.superiorExtendedEngine.gamePad.GameStickView
android:id="@+id/gameStickView"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="20dp"
android:layout_marginStart="30dp"
android:visibility="invisible"
/>
<com.scrappers.superiorExtendedEngine.gamePad.ControlButtonsView
android:id="@+id/gamePadbtns"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="30dp"
android:layout_marginBottom="30dp"
android:visibility="invisible"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:gravity="center">
<ImageView
android:id="@+id/pause"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/ic_twotone_pause_circle_filled_24"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:padding="20dp"
android:gravity="center">
<com.scrappers.superiorExtendedEngine.gamePad.Speedometer
android:id="@+id/speedometer"
android:visibility="invisible"
android:layout_width="140dp"
android:layout_height="140dp" />
</LinearLayout>
</RelativeLayout>
this would be an example , instead of
<com.scrappers.superiorExtendedEngine.jmeSurfaceView.JmESurfaceView
android:id="@+id/jmeSurfaceView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
use RelativeLayout/FrameLayout or any another View that extends ViewGroup.
Git repo:
I will sure try it out, let you know how it go.
Thanks for help.