<?xml version="1.0" encoding="utf-8"?>
<!--
  TimeLimit Copyright <C> 2019 Jonas Lochmann
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation version 3 of the License.

  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 <https://www.gnu.org/licenses/>.
-->
<layout 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">

    <data>
        <variable
            name="text"
            type="String" />
    </data>

    <androidx.cardview.widget.CardView
        app:cardUseCompatPadding="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <RelativeLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:padding="8dp"
                android:textAppearance="?android:textAppearanceMedium"
                tools:text="Some very long text\nwith line breaks"
                android:text="@{text}"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <ImageButton
                android:contentDescription="@string/diagnose_sync_copy_to_clipboard"
                android:padding="8dp"
                android:layout_alignParentEnd="true"
                android:background="?selectableItemBackground"
                android:id="@+id/copy_button"
                android:src="@drawable/ic_content_copy_black_24dp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

        </RelativeLayout>
    </androidx.cardview.widget.CardView>
</layout>
