<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2022 Tobias Kaminsky <tobias@kaminsky.me>
  ~ SPDX-FileCopyrightText: 2022 Nextcloud GmbH
  ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@android:id/background"
    style="@style/Widget.Nextcloud.AppWidget.Container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:backgroundTint="@color/grey_200"
    android:orientation="vertical"
    android:theme="@style/Theme.ownCloud.Toolbar.AppWidgetContainer">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_marginStart="@dimen/standard_margin"
        android:layout_marginTop="@dimen/standard_margin"
        android:layout_marginEnd="@dimen/standard_margin"
        android:layout_marginBottom="@dimen/standard_margin"
        tools:ignore="UseCompoundDrawables">

        <ImageView
            android:id="@+id/icon"
            android:layout_width="32dp"
            android:layout_height="32dp"
            android:layout_gravity="center_vertical"
            android:layout_marginEnd="@dimen/standard_half_margin"
            android:contentDescription="@string/icon_of_dashboard_widget"
            android:src="@drawable/ic_dashboard" />

        <TextView
            android:id="@+id/title"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_weight="1"
            android:textColor="@color/black"
            android:textStyle="bold" />

        <ImageView
            android:id="@+id/create"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_gravity="center_vertical"
            android:layout_weight="0"
            android:contentDescription="@string/create_new"
            android:layout_marginEnd="@dimen/standard_margin"
            android:src="@drawable/ic_plus" />

        <ImageView
            android:id="@+id/reload"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_gravity="center_vertical"
            android:layout_weight="0"
            android:contentDescription="@string/refresh_content"
            android:src="@drawable/ic_sync" />
    </LinearLayout>

    <ListView
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:divider="@null"
        android:layout_marginStart="@dimen/standard_margin"
        android:layout_marginEnd="@dimen/zero" />

    <LinearLayout
        android:id="@+id/empty_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="top"
        android:layout_margin="@dimen/standard_half_margin"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        android:visibility="gone"
        android:paddingTop="@dimen/standard_margin">

        <ImageView
            android:id="@+id/empty_list_icon"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:src="@drawable/ic_check"
            android:contentDescription="@string/icon_for_empty_list" />

        <TextView
            android:id="@+id/empty_list_view_headline"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:ellipsize="end"
            android:gravity="center"
            android:maxLines="2"
            android:textColor="@color/black"
            android:paddingTop="@dimen/standard_half_padding"
            android:paddingBottom="@dimen/standard_half_padding"
            android:text="@string/no_items"
            android:textSize="20sp" />

        <TextView
            android:id="@+id/empty_list_view_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:ellipsize="end"
            android:gravity="center"
            android:textColor="@color/black"
            android:paddingTop="@dimen/standard_half_padding"
            android:paddingBottom="@dimen/standard_half_padding"
            android:text="@string/check_back_later_or_reload" />
    </LinearLayout>

    <Button
        android:id="@+id/button"

        android:layout_width="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_height="wrap_content"
        android:visibility="gone" />
</LinearLayout>
