<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2021 PSMForums. All rights reserved.
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/linearLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:animateLayoutChanges="true"
    android:orientation="vertical">

    <include
        android:id="@+id/toolbar"
        layout="@layout/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="16dp"
                android:layout_marginVertical="8dp">
                <androidx.appcompat.widget.SearchView
                    android:id="@+id/searchView"
                    android:padding="8dp"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:drawableStart="@drawable/ic_add"
                    app:iconifiedByDefault="false"
                    app:queryHint="@string/search_feeds..." />
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_marginHorizontal="16dp"
                android:layout_marginVertical="8dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <androidx.recyclerview.widget.RecyclerView
                    android:nestedScrollingEnabled="false"
                    android:id="@+id/recycler_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>
            </androidx.cardview.widget.CardView>

            <View
                style="@style/Divider"
                android:layout_marginTop="16dp"
                />

            <TextView
                android:id="@+id/add_url_text_view"
                android:layout_width='match_parent'
                android:layout_height="wrap_content"
                style="@style/Buttonized"
                android:textStyle="bold"
                android:textAppearance="@style/TextAppearance.AppCompat.Menu"
                android:padding="16dp"
                android:gravity="center_vertical"
                android:text="@string/add_feed_by_url"
                android:drawablePadding="8dp"
                app:drawableStartCompat="@drawable/ic_add" />

            <TextView
                android:id="@+id/import_opml_text_view"
                android:layout_width='match_parent'
                android:layout_height="wrap_content"
                style="@style/Buttonized"
                android:textStyle="bold"
                android:textAppearance="@style/TextAppearance.AppCompat.Menu"
                android:padding="16dp"
                android:gravity="center_vertical"
                android:text="@string/import_opml"
                android:drawablePadding="8dp"
                app:drawableStartCompat="@drawable/ic_import" />

        </LinearLayout>
    </androidx.core.widget.NestedScrollView>
</LinearLayout>