|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + xmlns:tools="http://schemas.android.com/tools" |
| 4 | + android:layout_width="match_parent" |
| 5 | + android:layout_height="match_parent" |
| 6 | + android:background="@color/incoming_call_background" |
| 7 | + android:orientation="vertical"> |
| 8 | + |
| 9 | + <!-- Top: Incoming call status with icon --> |
| 10 | + <LinearLayout |
| 11 | + android:layout_width="match_parent" |
| 12 | + android:layout_height="wrap_content" |
| 13 | + android:gravity="center" |
| 14 | + android:orientation="horizontal" |
| 15 | + android:paddingTop="32dp"> |
| 16 | + |
| 17 | + <ImageView |
| 18 | + android:id="@+id/header_icon" |
| 19 | + android:layout_width="24dp" |
| 20 | + android:layout_height="24dp" |
| 21 | + android:layout_marginEnd="8dp" |
| 22 | + android:importantForAccessibility="no" |
| 23 | + android:src="@drawable/ic_notification" |
| 24 | + android:tint="@color/incoming_call_header_icon" /> |
| 25 | + |
| 26 | + <TextView |
| 27 | + android:id="@+id/header_text" |
| 28 | + android:layout_width="wrap_content" |
| 29 | + android:layout_height="wrap_content" |
| 30 | + android:fontFamily="sans-serif" |
| 31 | + android:text="@string/incoming_call_status" |
| 32 | + android:textColor="@color/incoming_call_header_text" |
| 33 | + android:textSize="18sp" /> |
| 34 | + |
| 35 | + </LinearLayout> |
| 36 | + |
| 37 | + <!-- Content row: caller info left, action buttons right --> |
| 38 | + <LinearLayout |
| 39 | + android:layout_width="match_parent" |
| 40 | + android:layout_height="0dp" |
| 41 | + android:layout_weight="1" |
| 42 | + android:gravity="center_vertical" |
| 43 | + android:orientation="horizontal" |
| 44 | + android:paddingStart="44dp" |
| 45 | + android:paddingEnd="44dp"> |
| 46 | + |
| 47 | + <!-- Left column: avatar + caller info --> |
| 48 | + <LinearLayout |
| 49 | + android:layout_width="0dp" |
| 50 | + android:layout_height="wrap_content" |
| 51 | + android:layout_weight="1" |
| 52 | + android:gravity="center" |
| 53 | + android:orientation="vertical"> |
| 54 | + |
| 55 | + <FrameLayout |
| 56 | + android:id="@+id/avatar_container" |
| 57 | + android:layout_width="80dp" |
| 58 | + android:layout_height="80dp" |
| 59 | + android:layout_marginBottom="16dp" |
| 60 | + android:visibility="gone"> |
| 61 | + |
| 62 | + <ImageView |
| 63 | + android:id="@+id/avatar" |
| 64 | + android:layout_width="match_parent" |
| 65 | + android:layout_height="match_parent" |
| 66 | + android:contentDescription="@string/incoming_call_avatar_description" |
| 67 | + android:scaleType="centerCrop" /> |
| 68 | + |
| 69 | + </FrameLayout> |
| 70 | + |
| 71 | + <TextView |
| 72 | + android:id="@+id/caller_name" |
| 73 | + android:layout_width="wrap_content" |
| 74 | + android:layout_height="wrap_content" |
| 75 | + android:layout_marginBottom="8dp" |
| 76 | + android:accessibilityLiveRegion="polite" |
| 77 | + android:ellipsize="end" |
| 78 | + android:gravity="center" |
| 79 | + android:maxLines="2" |
| 80 | + android:textColor="@color/incoming_call_name" |
| 81 | + android:textSize="22sp" |
| 82 | + android:textStyle="bold" |
| 83 | + tools:text="Unknown caller" /> |
| 84 | + |
| 85 | + <TextView |
| 86 | + android:id="@+id/host_name" |
| 87 | + android:layout_width="wrap_content" |
| 88 | + android:layout_height="wrap_content" |
| 89 | + android:ellipsize="end" |
| 90 | + android:gravity="center" |
| 91 | + android:maxLines="1" |
| 92 | + android:textColor="@color/incoming_call_host_name" |
| 93 | + android:textSize="18sp" |
| 94 | + tools:text="Unknown host" /> |
| 95 | + |
| 96 | + </LinearLayout> |
| 97 | + |
| 98 | + <!-- Right column: decline + accept buttons side-by-side --> |
| 99 | + <LinearLayout |
| 100 | + android:layout_width="0dp" |
| 101 | + android:layout_height="wrap_content" |
| 102 | + android:layout_weight="1" |
| 103 | + android:gravity="center" |
| 104 | + android:orientation="horizontal"> |
| 105 | + |
| 106 | + <!-- Decline button --> |
| 107 | + <LinearLayout |
| 108 | + android:id="@+id/btn_decline" |
| 109 | + android:layout_width="wrap_content" |
| 110 | + android:layout_height="wrap_content" |
| 111 | + android:layout_marginEnd="16dp" |
| 112 | + android:background="?attr/selectableItemBackground" |
| 113 | + android:clickable="true" |
| 114 | + android:contentDescription="@string/incoming_call_reject" |
| 115 | + android:focusable="true" |
| 116 | + android:gravity="center" |
| 117 | + android:orientation="vertical" |
| 118 | + android:padding="16dp"> |
| 119 | + |
| 120 | + <FrameLayout |
| 121 | + android:id="@+id/btn_reject_bg" |
| 122 | + android:layout_width="64dp" |
| 123 | + android:layout_height="64dp" |
| 124 | + android:background="@drawable/bg_btn_reject" |
| 125 | + android:gravity="center"> |
| 126 | + |
| 127 | + <ImageView |
| 128 | + android:layout_width="36dp" |
| 129 | + android:layout_height="36dp" |
| 130 | + android:layout_gravity="center" |
| 131 | + android:contentDescription="@string/incoming_call_reject" |
| 132 | + android:importantForAccessibility="no" |
| 133 | + android:src="@drawable/ic_call_end" /> |
| 134 | + |
| 135 | + </FrameLayout> |
| 136 | + |
| 137 | + <TextView |
| 138 | + android:id="@+id/incoming_call_reject_label" |
| 139 | + android:layout_width="wrap_content" |
| 140 | + android:layout_height="wrap_content" |
| 141 | + android:layout_marginTop="8dp" |
| 142 | + android:importantForAccessibility="no" |
| 143 | + android:text="@string/incoming_call_reject" |
| 144 | + android:textColor="@color/incoming_call_button_label" |
| 145 | + android:textSize="14sp" /> |
| 146 | + |
| 147 | + </LinearLayout> |
| 148 | + |
| 149 | + <!-- Accept button --> |
| 150 | + <LinearLayout |
| 151 | + android:id="@+id/btn_accept" |
| 152 | + android:layout_width="wrap_content" |
| 153 | + android:layout_height="wrap_content" |
| 154 | + android:background="?attr/selectableItemBackground" |
| 155 | + android:clickable="true" |
| 156 | + android:contentDescription="@string/incoming_call_accept" |
| 157 | + android:focusable="true" |
| 158 | + android:gravity="center" |
| 159 | + android:orientation="vertical" |
| 160 | + android:padding="16dp"> |
| 161 | + |
| 162 | + <FrameLayout |
| 163 | + android:id="@+id/btn_accept_bg" |
| 164 | + android:layout_width="64dp" |
| 165 | + android:layout_height="64dp" |
| 166 | + android:background="@drawable/bg_btn_accept" |
| 167 | + android:gravity="center"> |
| 168 | + |
| 169 | + <ImageView |
| 170 | + android:layout_width="36dp" |
| 171 | + android:layout_height="36dp" |
| 172 | + android:layout_gravity="center" |
| 173 | + android:contentDescription="@string/incoming_call_accept" |
| 174 | + android:importantForAccessibility="no" |
| 175 | + android:src="@drawable/ic_call" /> |
| 176 | + |
| 177 | + </FrameLayout> |
| 178 | + |
| 179 | + <TextView |
| 180 | + android:id="@+id/incoming_call_accept_label" |
| 181 | + android:layout_width="wrap_content" |
| 182 | + android:layout_height="wrap_content" |
| 183 | + android:layout_marginTop="8dp" |
| 184 | + android:importantForAccessibility="no" |
| 185 | + android:text="@string/incoming_call_accept" |
| 186 | + android:textColor="@color/incoming_call_button_label" |
| 187 | + android:textSize="14sp" /> |
| 188 | + |
| 189 | + </LinearLayout> |
| 190 | + |
| 191 | + </LinearLayout> |
| 192 | + |
| 193 | + </LinearLayout> |
| 194 | + |
| 195 | +</LinearLayout> |
0 commit comments