<?xml version="1.0" encoding="utf-8"?><!--
  ownCloud Android client application
  Copyright (C) 2016 ownCloud GmbH.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 2,
  as published by the Free Software Foundation.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/shareScroll"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".presentation.sharing.ShareActivity">

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

        <RelativeLayout
            android:id="@+id/shareHeaderContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="@dimen/standard_padding">

            <ImageView
                android:id="@+id/shareFileIcon"
                android:layout_width="@dimen/file_icon_size"
                android:layout_height="@dimen/file_icon_size"
                android:layout_gravity="center_vertical"
                android:layout_marginEnd="@dimen/standard_half_margin"
                android:src="@drawable/file" />

            <TextView
                android:id="@+id/shareFileName"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/standard_half_margin"
                android:layout_marginStart="4dp"
                android:layout_toEndOf="@+id/shareFileIcon"
                android:layout_toStartOf="@+id/getPrivateLinkButton"
                android:ellipsize="middle"
                android:singleLine="true"
                android:text="@string/placeholder_filename"
                android:textColor="@color/black"
                android:textSize="16sp" />

            <TextView
                android:id="@+id/shareFileSize"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/shareFileName"
                android:layout_gravity="center_vertical"
                android:layout_marginStart="4dp"
                android:layout_toEndOf="@+id/shareFileIcon"
                android:text="@string/placeholder_filesize"
                android:textColor="@color/list_item_lastmod_and_filesize_text"
                android:textSize="12sp" />

            <ImageButton
                android:id="@+id/getPrivateLinkButton"
                android:layout_width="36dp"
                android:layout_height="36dp"
                android:layout_alignParentEnd="true"
                android:padding="@dimen/standard_half_padding"
                android:src="@drawable/copy_link"
                android:scaleType="centerCrop"
                android:background="@color/transparent"
                android:contentDescription="@string/content_description_get_private_link" />

        </RelativeLayout>

        <View
            android:id="@+id/shareHeaderDivider"
            android:layout_width="match_parent"
            android:layout_height="2dp"
            android:background="@color/actionbar_start_color" />

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

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/actionbar_start_color">

                <TextView
                    android:id="@+id/shareWithUsersSectionTitle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:paddingStart="@dimen/standard_half_padding"
                    android:text="@string/share_with_user_section_title"
                    android:textAllCaps="true"
                    android:textColor="@color/white"
                    android:textStyle="bold"
                    android:accessibilityHeading="true"/>

                <ImageButton
                    android:id="@+id/addUserButton"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:layout_alignParentEnd="true"
                    android:background="@color/transparent"
                    android:src="@drawable/ic_add"
                    android:contentDescription="@string/content_description_add_share" />

            </RelativeLayout>

            <ListView
                android:id="@+id/shareUsersList"
                android:layout_width="match_parent"
                android:layout_height="0dip"
                android:layout_weight="1"
                android:scrollbars="vertical"
                android:visibility="gone" />

            <TextView
                android:id="@+id/shareNoUsers"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingBottom="@dimen/standard_padding"
                android:paddingStart="@dimen/standard_half_padding"
                android:paddingTop="@dimen/standard_padding"
                android:text="@string/share_no_users"
                android:textSize="15sp" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/shareViaLinkSection"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingBottom="@dimen/standard_padding">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/actionbar_start_color">

                <TextView
                    android:id="@+id/shareWithPublicLinkTitle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:paddingStart="@dimen/standard_half_padding"
                    android:text="@string/share_via_link_section_title"
                    android:textAllCaps="true"
                    android:textColor="@color/white"
                    android:textStyle="bold"
                    android:accessibilityHeading="true"/>

                <ImageButton
                    android:id="@+id/addPublicLinkButton"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:layout_alignParentEnd="true"
                    android:background="@color/transparent"
                    android:src="@drawable/ic_add"
                    android:contentDescription="@string/content_description_add_public_link" />

            </RelativeLayout>

            <TextView
                android:id="@+id/shareWarning"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/warning_background_color"
                android:paddingBottom="@dimen/standard_padding"
                android:paddingLeft="@dimen/standard_half_padding"
                android:paddingRight="@dimen/standard_half_padding"
                android:paddingTop="@dimen/standard_padding"
                android:text="@string/share_warning_about_forwarding_public_links"
                android:textColor="@color/warning_grey_text"
                android:textSize="15sp" />

            <ListView
                android:id="@+id/sharePublicLinksList"
                android:layout_width="match_parent"
                android:layout_height="0dip"
                android:layout_weight="1"
                android:scrollbars="vertical"
                android:visibility="gone" />

            <TextView
                android:id="@+id/shareNoPublicLinks"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingBottom="@dimen/standard_padding"
                android:paddingStart="@dimen/standard_half_padding"
                android:paddingTop="@dimen/standard_padding"
                android:text="@string/share_no_public_links"
                android:textSize="15sp" />

        </LinearLayout>

    </LinearLayout>

</ScrollView>
