<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingTop="16dp"
        android:paddingHorizontal="16dp"
        android:paddingBottom="8dp"
        android:orientation="horizontal">
        <ImageView
            android:id="@+id/image_view"
            android:layout_width="48dp"
            android:layout_height="48dp" />
        <EditText
            android:id="@+id/title_edit_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:drawableStart="@drawable/ic_edit"
            android:drawablePadding="8dp"
            android:inputType="textCapSentences"
            android:maxLines="2"
            android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"
            android:hint="@string/title"
            tools:text="Feed Title"
            android:importantForAutofill="no" />
    </LinearLayout>

    <AutoCompleteTextView
        android:id="@+id/category_edit_text"
        style="@style/TextAppearance.MaterialComponents.Body1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:drawableStart="@drawable/ic_edit"
        android:drawablePadding="8dp"
        android:maxLines="1"
        android:inputType="textCapWords"
        android:layout_marginHorizontal="16dp"
        android:layout_marginVertical="8dp"
        android:hint="@string/category"
        tools:text="Category" />

    <TextView
        android:id="@+id/url_text_view"
        style="@style/TextAppearance.MaterialComponents.Body1"
        android:gravity="center_vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingHorizontal="16dp"
        android:paddingVertical="8dp"
        android:drawablePadding="8dp"
        android:hint="@string/url"
        tools:text="https://www.example.com/feed"
        app:drawableStartCompat="@drawable/ic_link" />

    <TextView
        android:id="@+id/description_text_view"
        style="@style/TextAppearance.MaterialComponents.Body1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="10"
        android:layout_marginTop="8dp"
        android:layout_marginHorizontal="16dp"
        android:layout_marginBottom="16dp"
        android:textColor="@android:color/primary_text_light"
        tools:text="Feed description goes here." />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="end"
        android:paddingHorizontal="8dp"
        android:orientation="horizontal">
        <Button
            android:id="@+id/undo_changes_button"
            style="@style/Widget.AppCompat.Button.ButtonBar.AlertDialog"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/undo_changes" />
        <Button
            android:id="@+id/done_button"
            style="@style/Widget.AppCompat.Button.ButtonBar.AlertDialog"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/done" />
    </LinearLayout>

</LinearLayout>