1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2023 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<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 android:layout_width="match_parent" 19 android:layout_height="wrap_content" 20 xmlns:app="http://schemas.android.com/apk/res-auto" 21 android:minHeight="?android:attr/listPreferredItemHeightSmall" 22 android:background="?android:attr/selectableItemBackground" 23 android:paddingStart="?android:attr/listPreferredItemPaddingStart" 24 android:clipToPadding="false"> 25 26 <LinearLayout 27 android:id="@+id/item_data_entry_container" 28 app:layout_constraintStart_toStartOf="parent" 29 app:layout_constraintTop_toTopOf="parent" 30 app:layout_constraintBottom_toBottomOf="parent" 31 app:layout_constraintEnd_toStartOf="@id/button_and_map_container" 32 app:layout_constraintHorizontal_chainStyle="spread_inside" 33 android:layout_width="wrap_content" 34 android:layout_height="wrap_content" 35 android:layout_marginVertical="26dp" 36 android:orientation="vertical" 37 app:layout_constrainedWidth="true" 38 app:layout_constraintHorizontal_bias="0.0" 39 android:layout_marginEnd="@dimen/spacing_large"> 40 41 <TextView 42 android:id="@+id/item_data_entry_header" 43 android:layout_width="wrap_content" 44 android:layout_height="wrap_content" 45 android:textAppearance="?attr/textAppearanceSummary" 46 android:textColor="?android:attr/textColorSecondary" 47 android:hyphenationFrequency="normalFast" 48 android:lineBreakWordStyle="phrase" 49 android:layout_marginBottom="4dp" 50 android:maxLines="2"/> 51 52 <TextView 53 android:id="@+id/item_data_entry_title" 54 android:layout_width="wrap_content" 55 android:layout_height="wrap_content" 56 android:maxLines="2" 57 android:hyphenationFrequency="normalFast" 58 android:lineBreakWordStyle="phrase" 59 android:textAppearance="?attr/textAppearanceItem" 60 android:ellipsize="marquee"/> 61 62 <TextView 63 android:id="@+id/item_data_entry_notes" 64 android:layout_width="wrap_content" 65 android:layout_height="wrap_content" 66 android:textAppearance="?android:attr/textAppearanceListItemSecondary" 67 android:textColor="?android:attr/textColorSecondary" 68 android:hyphenationFrequency="normalFast" 69 android:lineBreakWordStyle="phrase" 70 android:visibility="gone" 71 android:maxLines="10"/> 72 </LinearLayout> 73 74 75 <LinearLayout 76 android:layout_width="wrap_content" 77 android:layout_height="wrap_content" 78 android:orientation="horizontal" 79 android:id="@+id/button_and_map_container" 80 app:layout_constraintHorizontal_chainStyle="spread_inside" 81 app:layout_constraintTop_toTopOf="parent" 82 app:layout_constraintEnd_toEndOf="parent" 83 app:layout_constraintBottom_toBottomOf="parent" 84 app:layout_constraintStart_toEndOf="@id/item_data_entry_container"> 85 86 <com.android.healthconnect.controller.shared.RoundView 87 android:id="@+id/map_round_view" 88 android:layout_width="@dimen/round_map_size" 89 android:layout_height="@dimen/round_map_size" 90 android:layout_marginEnd="@dimen/spacing_large" 91 android:layout_gravity="center_vertical" 92 android:gravity="center" 93 android:visibility="gone"> 94 95 <com.android.healthconnect.controller.shared.map.MapView 96 android:layout_width="match_parent" 97 android:layout_height="match_parent" 98 android:id="@+id/map_view"/> 99 </com.android.healthconnect.controller.shared.RoundView> 100 101 <LinearLayout 102 android:id="@+id/item_data_entry_divider" 103 android:layout_width="wrap_content" 104 android:layout_height="@dimen/round_map_size" 105 android:layout_gravity="center_vertical" 106 android:gravity="center" 107 android:paddingTop="@dimen/spacing_small" 108 android:paddingBottom="@dimen/spacing_small" 109 android:orientation="horizontal"> 110 <View 111 android:layout_width="1dp" 112 android:layout_height="match_parent" 113 android:background="?android:attr/listDivider" /> 114 </LinearLayout> 115 116 <ImageButton 117 android:id="@+id/item_data_entry_delete" 118 android:layout_width="wrap_content" 119 android:layout_height="wrap_content" 120 android:background="?android:attr/selectableItemBackground" 121 android:minWidth="@dimen/two_target_min_width" 122 android:minHeight="@dimen/two_target_min_width" 123 android:src="?attr/deleteIcon"/> 124 </LinearLayout> 125</androidx.constraintlayout.widget.ConstraintLayout>