<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.bosphere.fadingedgelayout.FadingEdgeLayout
        android:id="@+id/fading_edge_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/grid_layout"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    </com.bosphere.fadingedgelayout.FadingEdgeLayout>

    <androidx.gridlayout.widget.GridLayout
        android:id="@+id/grid_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="8dp"
        android:layout_alignParentBottom="true"
        android:background="@android:color/background_dark"
        app:alignmentMode="alignBounds"
        app:columnCount="4">

        <TextView
            android:text="Orientation"
            android:textColor="@android:color/white"
            app:layout_columnSpan="1"
            app:layout_gravity="center_vertical"/>

        <RadioGroup
            android:orientation="horizontal"
            android:gravity="center_vertical"
            app:layout_columnSpan="3"
            app:layout_gravity="fill_horizontal">

            <androidx.appcompat.widget.AppCompatRadioButton
                android:id="@+id/rb_vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Vertical"
                android:checked="true"
                android:onClick="onClickedOrientation"/>

            <androidx.appcompat.widget.AppCompatRadioButton
                android:id="@+id/rb_horizontal"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Horizontal"
                android:onClick="onClickedOrientation"/>

        </RadioGroup>

        <FrameLayout
            app:layout_columnWeight="1"
            app:layout_gravity="fill_horizontal">

            <androidx.appcompat.widget.SwitchCompat
                android:id="@+id/sw_top"
                android:text="Top"
                android:onClick="onClickedSwitch"
                android:layout_gravity="center_vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>
        </FrameLayout>

        <FrameLayout
            app:layout_columnWeight="1"
            app:layout_gravity="fill_horizontal">

            <androidx.appcompat.widget.SwitchCompat
                android:id="@+id/sw_left"
                android:text="Left"
                android:onClick="onClickedSwitch"
                android:layout_gravity="center_vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>
        </FrameLayout>

        <FrameLayout
            app:layout_columnWeight="1"
            app:layout_gravity="fill_horizontal">

            <androidx.appcompat.widget.SwitchCompat
                android:id="@+id/sw_bottom"
                android:text="Bottom"
                android:onClick="onClickedSwitch"
                android:layout_gravity="center_vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>
        </FrameLayout>

        <FrameLayout
            app:layout_columnWeight="1"
            app:layout_gravity="fill_horizontal">

            <androidx.appcompat.widget.SwitchCompat
                android:id="@+id/sw_right"
                android:text="Right"
                android:onClick="onClickedSwitch"
                android:layout_gravity="center_vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>
        </FrameLayout>

        <TextView
            android:text="Fade size"
            android:textColor="@android:color/white"
            app:layout_columnSpan="1"
            app:layout_gravity="center_vertical"/>

        <androidx.appcompat.widget.AppCompatSeekBar
            android:id="@+id/sb_size"
            android:layout_height="40dp"
            app:layout_columnSpan="3"
            app:layout_gravity="center_vertical|fill_horizontal"/>

    </androidx.gridlayout.widget.GridLayout>

</RelativeLayout>