Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3   Copyright (C) 2016 The Android Open Source Project
      4 
      5   Licensed under the Apache License, Version 2.0 (the "License");
      6   you may not use this file except in compliance with the License.
      7   You may obtain a copy of the License at
      8 
      9       http://www.apache.org/licenses/LICENSE-2.0
     10 
     11   Unless required by applicable law or agreed to in writing, software
     12   distributed under the License is distributed on an "AS IS" BASIS,
     13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14   See the License for the specific language governing permissions and
     15   limitations under the License.
     16   -->
     17 
     18 <!-- This parent FrameLayout provides a tap ripple effect over all children. -->
     19 <FrameLayout
     20     xmlns:android="http://schemas.android.com/apk/res/android"
     21     xmlns:app="http://schemas.android.com/apk/res-auto"
     22     xmlns:tools="http://schemas.android.com/tools"
     23     android:layout_width="match_parent"
     24     android:layout_height="wrap_content"
     25     android:foreground="?attr/selectableItemBackground">
     26 
     27     <LinearLayout
     28         android:layout_width="match_parent"
     29         android:layout_height="wrap_content"
     30         android:animateLayoutChanges="true"
     31         android:orientation="horizontal"
     32         android:paddingBottom="8dp"
     33         android:paddingTop="8dp"
     34         tools:ignore="UselessParent">
     35 
     36         <Space
     37             android:layout_width="0dp"
     38             android:layout_height="match_parent"
     39             android:layout_weight="@integer/gutter_width_percent" />
     40 
     41         <RelativeLayout
     42             android:layout_width="0dp"
     43             android:layout_height="wrap_content"
     44             android:layout_weight="@integer/guttered_content_width_percent"
     45             android:gravity="center_vertical"
     46             android:orientation="horizontal">
     47 
     48             <LinearLayout
     49                 android:layout_width="wrap_content"
     50                 android:layout_height="wrap_content"
     51                 android:gravity="center_vertical">
     52 
     53                 <ImageView
     54                     android:id="@+id/ringtone_image"
     55                     android:layout_width="40dp"
     56                     android:layout_height="40dp"
     57                     android:importantForAccessibility="no"
     58                     android:scaleType="center" />
     59 
     60                 <TextView
     61                     android:id="@+id/ringtone_name"
     62                     android:layout_width="wrap_content"
     63                     android:layout_height="wrap_content"
     64                     android:paddingEnd="16dp"
     65                     android:paddingStart="16dp"
     66                     android:textColor="@color/white"
     67                     android:textSize="@dimen/alarm_text_font_size" />
     68 
     69             </LinearLayout>
     70 
     71             <ImageView
     72                 android:id="@+id/sound_image_selected"
     73                 android:layout_width="40dp"
     74                 android:layout_height="40dp"
     75                 android:layout_alignParentEnd="true"
     76                 android:layout_centerVertical="true"
     77                 android:importantForAccessibility="no"
     78                 android:scaleType="center"
     79                 android:tint="?attr/colorAccent"
     80                 android:visibility="gone"
     81                 app:srcCompat="@drawable/ic_checkmark" />
     82 
     83         </RelativeLayout>
     84 
     85         <Space
     86             android:layout_width="0dp"
     87             android:layout_height="match_parent"
     88             android:layout_weight="@integer/gutter_width_percent" />
     89 
     90     </LinearLayout>
     91 
     92 </FrameLayout>
     93