<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_margin="@dimen/fab_margin"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <ScrollView
            android:id="@+id/scrolling_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:paddingBottom="50dp"
            android:scrollbars="none">

            <LinearLayout
                android:id="@+id/instance_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:visibility="gone">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/invidious_instances"
                    android:textColor="@color/colorAccent"
                    android:textSize="16sp" />

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:text="@string/nitter_instances"
                    android:textColor="@color/colorAccent"
                    android:textSize="16sp" />

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:text="@string/bibliogram_instances"
                    android:textColor="@color/colorAccent"
                    android:textSize="16sp" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/bibliogram_instances"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />
            </LinearLayout>
        </ScrollView>

        <RelativeLayout
            android:id="@+id/loader"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ProgressBar
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true" />
        </RelativeLayout>
    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:gravity="center"
        android:orientation="horizontal">

        <ImageButton
            android:id="@+id/instance_info"
            style="@style/Widget.AppCompat.Button.Colored"
            android:layout_width="50dp"
            android:layout_height="wrap_content"
            android:contentDescription="@string/instance_info"
            android:src="@drawable/ic_info_outline" />

        <Button
            android:id="@+id/latency_test"
            style="@style/Widget.AppCompat.Button.Colored"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginStart="5dp"
            android:layout_marginLeft="5dp"
            android:paddingStart="20dp"
            android:paddingLeft="20dp"
            android:paddingEnd="20dp"
            android:paddingRight="20dp"
            android:text="@string/latency"
            android:textColor="@android:color/white" />

        <Button
            android:id="@+id/close"
            style="@style/Widget.AppCompat.Button.Colored"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginStart="5dp"
            android:layout_marginLeft="5dp"
            android:paddingStart="20dp"
            android:paddingLeft="20dp"
            android:paddingEnd="20dp"
            android:paddingRight="20dp"
            android:text="@string/close"
            android:textColor="@android:color/white" />
    </LinearLayout>

</LinearLayout>

