<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2016 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.
  -->

<!-- This parent FrameLayout provides a tap ripple effect over all children. -->
<FrameLayout
    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:foreground="?attr/selectableItemBackground">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:animateLayoutChanges="true"
        android:orientation="horizontal"
        android:paddingBottom="8dp"
        android:paddingTop="8dp"
        tools:ignore="UselessParent">

        <Space
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="@integer/gutter_width_percent" />

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="@integer/guttered_content_width_percent"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center_vertical">

                <ImageView
                    android:id="@+id/ringtone_image"
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:importantForAccessibility="no"
                    android:scaleType="center" />

                <TextView
                    android:id="@+id/ringtone_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingEnd="16dp"
                    android:paddingStart="16dp"
                    android:textColor="@color/white"
                    android:textSize="@dimen/alarm_text_font_size" />

            </LinearLayout>

            <ImageView
                android:id="@+id/sound_image_selected"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_alignParentEnd="true"
                android:layout_centerVertical="true"
                android:importantForAccessibility="no"
                android:scaleType="center"
                android:tint="?attr/colorAccent"
                android:visibility="gone"
                app:srcCompat="@drawable/ic_checkmark" />

        </RelativeLayout>

        <Space
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="@integer/gutter_width_percent" />

    </LinearLayout>

</FrameLayout>