nested ConstraintLayout visibility on Screen ON/OFF
<p>i have a layout that has the following hierarchy</p>

<p><strong>list.xml</strong></p>

<pre><code>&lt;android.support.constraint.ConstraintLayout
    android:id="@+id/layout_content"
    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"&gt;

    &lt;android.support.v4.widget.SwipeRefreshLayout
        android:id="@+id/refresh"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="@+id/layout_content"
        app:layout_constraintStart_toStartOf="@+id/layout_content"
        app:layout_constraintTop_toTopOf="@+id/layout_content"
        tools:layout_constraintEnd_creator="0"
        tools:layout_constraintStart_creator="0"
        tools:layout_editor_absoluteX="0dp"&gt;

        &lt;com.fastaccess.cheaphlight.ui.widgets.recyclerview.DynamicRecyclerView
            android:id="@+id/recycler"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="@dimen/spacing_large"
            app:layoutManager="@string/staggered_layout_manager"
            app:layout_constraintLeft_toLeftOf="@+id/refresh"
            app:spanCount="2"
            tools:listitem="@layout/county_row_item"/&gt;

    &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;

    &lt;include
        layout="@layout/empty_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="@+id/layout_content"
        app:layout_constraintStart_toStartOf="@+id/layout_content"
        app:layout_constraintTop_toTopOf="@+id/layout_content"
        tools:layout_constraintBottom_creator="0"
        tools:layout_constraintEnd_creator="0"
        tools:layout_constraintStart_creator="0"
        tools:layout_constraintTop_creator="0"/&gt;

    &lt;include
        layout="@layout/progress_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:paddingBottom="?attr/actionBarSize"
        app:layout_constraintBottom_toBottomOf="@+id/layout_content"
        app:layout_constraintEnd_toEndOf="@+id/layout_content"
        app:layout_constraintStart_toStartOf="@+id/layout_content"
        app:layout_constraintTop_toTopOf="@+id/layout_content"
        tools:layout_constraintBottom_creator="0"
        tools:layout_constraintEnd_creator="0"
        tools:layout_constraintStart_creator="0"
        tools:layout_constraintTop_creator="0"
        tools:layout_editor_absoluteX="205dp"
        tools:layout_editor_absoluteY="382dp"/&gt;
&lt;/android.support.constraint.ConstraintLayout&gt;
</code></pre>

<p><strong>empty_layout.xml</strong></p>

<pre><code>    &lt;android.support.constraint.ConstraintLayout
    android:id="@+id/empty_layout"
    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="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:visibility="gone"
    tools:visibility="visible"&gt;

    &lt;ImageView
        android:id="@+id/image_message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_sad_face"
        app:layout_constraintBottom_toBottomOf="@+id/empty_layout"
        app:layout_constraintEnd_toEndOf="@+id/empty_layout"
        app:layout_constraintStart_toStartOf="@+id/empty_layout"
        app:layout_constraintTop_toTopOf="@+id/empty_layout"
        app:layout_constraintVertical_bias="0.19"
        tools:ignore="ContentDescription"
        tools:layout_constraintBottom_creator="0"
        tools:layout_constraintEnd_creator="0"
        tools:layout_constraintStart_creator="0"
        tools:layout_constraintTop_creator="0"
        tools:layout_editor_absoluteX="145dp"
        tools:layout_editor_absoluteY="321dp"/&gt;

    &lt;com.fastaccess.cheaphlight.ui.widgets.FontTextView
        android:id="@+id/text_message"
        style="@style/TextAppearance.AppCompat.Medium"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/image_message"
        android:layout_centerHorizontal="true"
        android:layout_margin="@dimen/spacing_normal"
        android:gravity="center_horizontal"
        android:padding="@dimen/spacing_s_large"
        android:textColor="@color/divider"
        app:layout_constraintEnd_toEndOf="@+id/empty_layout"
        app:layout_constraintStart_toStartOf="@+id/empty_layout"
        app:layout_constraintTop_toBottomOf="@+id/image_message"
        tools:layout_constraintEnd_creator="0"
        tools:layout_constraintStart_creator="0"
        tools:layout_constraintTop_creator="0"
        tools:layout_editor_absoluteX="205dp"
        tools:layout_editor_absoluteY="441dp"
        tools:text="Error Message"/&gt;

    &lt;com.fastaccess.cheaphlight.ui.widgets.FontButton
        android:id="@+id/reload_button"
        style="@style/Widget.AppCompat.Button.Borderless"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/text_message"
        android:layout_centerHorizontal="true"
        android:layout_margin="@dimen/spacing_normal"
        android:padding="@dimen/spacing_s_large"
        android:text="@string/reload"
        android:textColor="@color/accent"
        app:layout_constraintEnd_toEndOf="@+id/empty_layout"
        app:layout_constraintStart_toStartOf="@+id/empty_layout"
        app:layout_constraintTop_toBottomOf="@+id/text_message"
        tools:layout_constraintEnd_creator="0"
        tools:layout_constraintStart_creator="0"
        tools:layout_constraintTop_creator="0"
        tools:layout_editor_absoluteX="205dp"
        tools:layout_editor_absoluteY="441dp"/&gt;
&lt;/android.support.constraint.ConstraintLayout&gt;
</code></pre>

<p><strong>progress_layout.xml</strong></p>

<pre><code>&lt;ProgressBar
android:id="@+id/progress_layout"
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"
android:layout_gravity="center"
android:paddingBottom="?attr/actionBarSize"
android:visibility="gone"
tools:visibility="visible"/&gt;
</code></pre>

<p>in my Fragment class, i'm hiding the SwipeRefreshLayout with its child RecyclerView and showing the empty_layout. this works fine, however if i ever turned the device screen OFF &amp; ON the empty_layout disappears. </p>

<p>FYI: i'v set the visibility for the nested ConstrainLayout to be always visible, but yet if i turned off/on the screen it disappears. </p>

<p>FYI: if i ever showed the ProgressView, the ProgressView remains visible on Screen on/off i'm assuming its due to that ProgressView is not wrapped under nested ConstraintLayout!?. </p>

<p>any idea on why the nested ConstrainLayout disappears on screen on/off only, while it remains if i rotated the screen? </p>