<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~
  ~ 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.
  -->

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:id="@+id/TopLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="8dp"
        android:orientation="vertical">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:text="Sample Card #1"/>

        <androidx.cardview.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="8dp"
            android:layout_marginBottom="16dp"
            android:clickable="true"
            android:focusable="true"
            android:minHeight="148dp">

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

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="16dp"
                    android:paddingBottom="8dp">

                    <ImageView
                        android:layout_width="50dp"
                        android:layout_height="50dp"
                        android:layout_marginEnd="8dp"
                        android:layout_marginRight="8dp"
                        android:contentDescription="Logo"
                        android:src="@drawable/icon"/>

                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1.0"
                        android:layout_marginStart="8dp"
                        android:layout_marginLeft="8dp"
                        android:orientation="vertical">
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:textStyle="bold"
                            android:text="Image Transition"/>

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="8dp"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:text="Touch the image to trigger the animation"/>
                    </LinearLayout>
                </LinearLayout>

                <com.android.test.hwui.BitmapTransitionView
                    android:layout_width="match_parent"
                    android:layout_height="194dp"
                    android:padding="8dp"/>

            </LinearLayout>

        </androidx.cardview.widget.CardView>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:text="Sample Card #2"/>

        <androidx.cardview.widget.CardView
            android:id="@+id/CardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="8dp"
            android:layout_marginBottom="16dp"
            android:clickable="true"
            android:focusable="true"
            android:minHeight="148dp">

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

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="16dp"
                    android:paddingBottom="8dp">

                    <ImageView
                        android:layout_width="50dp"
                        android:layout_height="50dp"
                        android:layout_marginEnd="8dp"
                        android:layout_marginRight="8dp"
                        android:contentDescription="Logo"
                        android:src="@drawable/icon"/>

                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1.0"
                        android:layout_marginStart="8dp"
                        android:layout_marginLeft="8dp"
                        android:orientation="vertical">
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:textStyle="bold"
                            android:text="View Group Manipulation"/>

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="8dp"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:text="Tap the card to trigger the animation"/>
                    </LinearLayout>
                </LinearLayout>

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="194dp"
                    android:background="@android:color/transparent"
                    android:src="@drawable/weather_2"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="16dp"
                    android:paddingBottom="8dp"
                    android:orientation="vertical">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">
                        <RatingBar
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:contentDescription="Card Rating"
                            android:isIndicator="true"
                            android:numStars="5"
                            android:rating="4.5"

                            android:stepSize="0.5"/>
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:gravity="center_vertical"
                            android:text="Category 4.5 Storm"/>
                    </LinearLayout>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="8dp"
                        android:maxLines="3"
                        android:textIsSelectable="true"
                        android:text="Lorem ipsum dolor sit amet, nec no nominavi scaevola. Per et
                        sint sapientem, nobis perpetua salutandi mei te. Quo tamquam probatus
                        reprehendunt in. Eos esse purto eruditi ea. Enim tation persius ut sea,
                        eos ad consul populo. Ne eum solet altera. Cibo eligendi et est, electram
                        theophrastus te vel eu."/>

                </LinearLayout>

            </LinearLayout>

        </androidx.cardview.widget.CardView>
    </LinearLayout>
</ScrollView>
