0
votes

Here is a fragment xml:

<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:ignore="MergeRootFrame"
    android:id="@+id/coordinatorLayout">

    <org.webrtc.SurfaceViewRenderer
        android:id="@+id/fullscreen_video_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center" />

    <org.webrtc.SurfaceViewRenderer
        android:id="@+id/pip_video_view"
        android:layout_height="144dp"
        android:layout_width="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="16dp"/>
</android.support.design.widget.CoordinatorLayout>

This fragment transaction:

getSupportFragmentManager().beginTransaction().replace(android.R.id.content, CallFragment.newInstance(), FRAGMENT_CALL).commit();

In fragment's onCreate I ask for fullscreen window:

getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

This is SnackBar creation in onViewCreated

mySnackbar = Snackbar.make(view.findViewById(R.id.coordinatorLayout), "End call ?", Snackbar.LENGTH_SHORT);

Both renderers got theirs setZOrderOnTop(false) called in onViewCreated.

The problem is on Lollipop the SnackBar is hidden behind fullscreen SurfaceView, while on Jelly Bean everything works as expected. If I DO NOT ask for fullscreen everything works in Lollipop too.

Any ideas, please ? Thanks in advance.

Did you try calling show () on it? - Kushan
Yeah, sure. Just like i wrote - on Lollipop SnackBar is hidden, on Jelly Bean - everything is ok. And if not asking for fullscreen it works everywhere. - psb