activity_contact_details.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<layout xmlns:android="http://schemas.android.com/apk/res/android"
  3    xmlns:app="http://schemas.android.com/apk/res-auto"
  4    xmlns:tools="http://schemas.android.com/tools">
  5
  6    <LinearLayout
  7        android:layout_width="match_parent"
  8        android:layout_height="match_parent"
  9        android:fitsSystemWindows="true"
 10        android:orientation="vertical">
 11
 12        <com.google.android.material.appbar.AppBarLayout
 13            android:layout_width="match_parent"
 14            android:layout_height="wrap_content">
 15
 16            <com.google.android.material.appbar.MaterialToolbar
 17                android:id="@+id/toolbar"
 18                android:layout_width="match_parent"
 19                android:layout_height="wrap_content"
 20                android:minHeight="?attr/actionBarSize" />
 21
 22        </com.google.android.material.appbar.AppBarLayout>
 23
 24        <ScrollView
 25            android:layout_width="fill_parent"
 26            android:layout_height="fill_parent">
 27
 28            <LinearLayout
 29                android:id="@+id/details_main_layout"
 30                android:layout_width="fill_parent"
 31                android:layout_height="wrap_content"
 32                android:orientation="vertical">
 33
 34                <com.google.android.material.card.MaterialCardView
 35                    android:layout_width="match_parent"
 36                    android:layout_height="wrap_content"
 37                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
 38                    android:layout_marginTop="@dimen/activity_vertical_margin"
 39                    android:layout_marginRight="@dimen/activity_horizontal_margin"
 40                    android:layout_marginBottom="@dimen/activity_vertical_margin">
 41
 42                    <RelativeLayout
 43                        android:layout_width="match_parent"
 44                        android:layout_height="wrap_content"
 45                        android:padding="@dimen/card_padding_regular">
 46
 47                        <com.google.android.material.imageview.ShapeableImageView
 48                            android:id="@+id/details_contact_badge"
 49                            android:layout_width="@dimen/avatar_on_details_screen_size"
 50                            android:layout_height="@dimen/avatar_on_details_screen_size"
 51                            android:layout_alignParentTop="true"
 52                            app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo"
 53                            android:scaleType="centerCrop" />
 54
 55                        <LinearLayout
 56                            android:id="@+id/details_jidbox"
 57                            android:layout_width="wrap_content"
 58                            android:layout_height="wrap_content"
 59                            android:layout_marginLeft="16dp"
 60                            android:layout_toRightOf="@+id/details_contact_badge"
 61                            android:orientation="vertical">
 62
 63                            <TextView
 64                                android:id="@+id/details_contactjid"
 65                                android:layout_width="wrap_content"
 66                                android:layout_height="wrap_content"
 67                                android:text="@string/account_settings_example_jabber_id"
 68                                android:textIsSelectable="true"
 69                                android:textAppearance="?textAppearanceTitleMedium" />
 70
 71                            <androidx.constraintlayout.widget.ConstraintLayout
 72                                android:id="@+id/tags"
 73                                android:layout_width="wrap_content"
 74                                android:layout_height="wrap_content"
 75                                android:layout_marginTop="8sp">
 76
 77                                <androidx.constraintlayout.helper.widget.Flow
 78                                    android:id="@+id/flow_widget"
 79                                    android:layout_width="0dp"
 80                                    android:layout_height="wrap_content"
 81                                    app:flow_horizontalBias="0"
 82                                    app:flow_horizontalGap="8sp"
 83                                    app:flow_horizontalStyle="packed"
 84                                    app:flow_verticalGap="4sp"
 85                                    app:flow_wrapMode="chain"
 86                                    app:layout_constraintEnd_toEndOf="parent"
 87                                    app:layout_constraintStart_toStartOf="parent"
 88                                    app:layout_constraintTop_toTopOf="parent" />
 89                            </androidx.constraintlayout.widget.ConstraintLayout>
 90
 91                            <com.cheogram.android.TagEditorView
 92                                android:id="@+id/edit_tags"
 93                                android:visibility="gone"
 94                                android:hint="Tags"
 95                                android:layout_width="match_parent"
 96                                android:layout_height="wrap_content"
 97                                android:layout_marginBottom="4dp"
 98                                android:layout_marginLeft="-4dp"
 99                                android:layout_marginTop="-4dp" />
100
101                            <TextView
102                                android:id="@+id/details_lastseen"
103                                android:layout_width="wrap_content"
104                                android:layout_height="wrap_content"
105                                android:layout_marginTop="4dp"
106                                android:textAppearance="?textAppearanceTitleSmall"
107                                tools:text="@string/just_now" />
108
109                            <TextView
110                                android:id="@+id/status_message"
111                                android:layout_width="wrap_content"
112                                android:layout_height="wrap_content"
113                                android:layout_marginTop="8dp"
114                                android:textAppearance="?textAppearanceBodyMedium"
115                                tools:text="Hey there! I’m using Conversations" />
116
117                            <Button
118                                android:id="@+id/add_contact_button"
119                                style="@style/Widget.Material3.Button.ElevatedButton"
120                                android:layout_width="wrap_content"
121                                android:layout_height="wrap_content"
122                                android:layout_marginTop="8dp"
123                                android:text="@string/add_contact" />
124
125                            <CheckBox
126                                android:id="@+id/details_send_presence"
127                                android:layout_width="wrap_content"
128                                android:layout_height="wrap_content"
129                                android:layout_marginTop="8dp"
130                                android:text="@string/send_presence_updates" />
131
132                            <CheckBox
133                                android:id="@+id/details_receive_presence"
134                                android:layout_width="wrap_content"
135                                android:layout_height="wrap_content"
136                                android:text="@string/receive_presence_updates" />
137                        </LinearLayout>
138
139                        <TextView
140                            android:id="@+id/details_account"
141                            android:layout_width="wrap_content"
142                            android:layout_height="wrap_content"
143                            android:layout_below="@+id/details_jidbox"
144                            android:layout_alignParentEnd="true"
145                            android:layout_marginTop="32dp"
146                            android:text="@string/using_account"
147                            android:textAppearance="?textAppearanceLabelMedium" />
148                    </RelativeLayout>
149                </com.google.android.material.card.MaterialCardView>
150
151                <com.google.android.material.card.MaterialCardView
152                    android:id="@+id/profile"
153                    android:layout_width="match_parent"
154                    android:layout_height="wrap_content"
155                    android:layout_marginBottom="@dimen/activity_vertical_margin"
156                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
157                    android:layout_marginRight="@dimen/activity_horizontal_margin"
158                    android:layout_marginTop="@dimen/activity_vertical_margin">
159
160                    <ListView
161                        android:id="@+id/profile_items"
162                        android:layout_width="fill_parent"
163                        android:layout_height="wrap_content"
164                        android:divider="@android:color/transparent"
165                        android:dividerHeight="0dp"></ListView>
166
167                </com.google.android.material.card.MaterialCardView>>
168
169                <com.google.android.material.card.MaterialCardView
170                    android:id="@+id/media_wrapper"
171                    android:layout_width="fill_parent"
172                    android:layout_height="wrap_content"
173                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
174                    android:layout_marginTop="@dimen/activity_vertical_margin"
175                    android:layout_marginRight="@dimen/activity_horizontal_margin"
176                    android:layout_marginBottom="@dimen/activity_vertical_margin">
177
178                    <LinearLayout
179                        android:layout_width="match_parent"
180                        android:layout_height="wrap_content"
181                        android:orientation="vertical"
182                        android:padding="@dimen/card_padding_regular">
183
184                        <RelativeLayout
185                            android:layout_width="match_parent"
186                            android:layout_height="wrap_content">
187
188                            <TextView
189                                android:text="Store media only in cache"
190                                android:layout_width="wrap_content"
191                                android:layout_height="wrap_content"
192                                android:layout_alignParentStart="true"
193                                android:layout_centerVertical="true"
194                                android:singleLine="true"
195                                android:textAppearance="?textAppearanceBodyMedium" />
196
197                            <androidx.appcompat.widget.SwitchCompat
198                                android:id="@+id/store_in_cache"
199                                android:layout_width="wrap_content"
200                                android:layout_height="wrap_content"
201                                android:layout_alignParentEnd="true"
202                                android:layout_centerVertical="true"
203                                android:focusable="false" />
204
205                        </RelativeLayout>
206
207                        <androidx.recyclerview.widget.RecyclerView
208                            android:id="@+id/media"
209                            android:layout_width="match_parent"
210                            android:layout_height="wrap_content"
211                            android:layout_margin="-2dp"
212                            android:orientation="horizontal" />
213
214                        <LinearLayout
215                            android:layout_width="wrap_content"
216                            android:layout_height="match_parent"
217                            android:layout_gravity="end"
218                            android:layout_marginTop="16dp"
219                            android:orientation="horizontal">
220
221                            <Button
222                                android:id="@+id/show_media"
223                                style="?attr/materialButtonOutlinedStyle"
224                                android:layout_width="wrap_content"
225                                android:layout_height="wrap_content"
226                                android:text="@string/view_media" />
227                        </LinearLayout>
228                    </LinearLayout>
229                </com.google.android.material.card.MaterialCardView>
230
231                <com.google.android.material.card.MaterialCardView
232                    android:id="@+id/keys_wrapper"
233                    android:layout_width="fill_parent"
234                    android:layout_height="wrap_content"
235                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
236                    android:layout_marginTop="@dimen/activity_vertical_margin"
237                    android:layout_marginRight="@dimen/activity_horizontal_margin"
238                    android:layout_marginBottom="@dimen/activity_vertical_margin">
239
240                    <LinearLayout
241                        android:layout_width="match_parent"
242                        android:layout_height="wrap_content"
243                        android:orientation="vertical">
244
245                        <LinearLayout
246                            android:id="@+id/details_contact_keys"
247                            android:layout_width="match_parent"
248                            android:layout_height="wrap_content"
249                            android:orientation="vertical"
250                            android:padding="@dimen/card_padding_list" />
251
252                        <LinearLayout
253                            android:id="@+id/unverified_warning"
254                            android:layout_width="match_parent"
255                            android:layout_height="wrap_content"
256                            android:paddingHorizontal="@dimen/card_padding_list">
257
258                            <TextView
259                                android:layout_width="wrap_content"
260                                android:layout_height="wrap_content"
261                                android:layout_marginHorizontal="@dimen/list_padding"
262                                android:text="@string/contact_uses_unverified_keys"
263                                android:textAppearance="?textAppearanceBodyMedium"
264                                android:textColor="?colorOnSurfaceVariant" />
265                        </LinearLayout>
266
267                        <LinearLayout
268                            android:layout_width="wrap_content"
269                            android:layout_height="match_parent"
270                            android:layout_marginTop="8dp"
271                            android:orientation="horizontal"
272                            android:padding="@dimen/card_padding_list">
273
274
275                            <Button
276                                android:id="@+id/scan_button"
277                                style="@style/Widget.Material3.Button.TextButton"
278                                android:layout_width="wrap_content"
279                                android:layout_height="wrap_content"
280                                android:text="@string/scan_qr_code" />
281
282                            <Button
283                                android:id="@+id/show_inactive_devices"
284                                style="@style/Widget.Material3.Button.TextButton"
285                                android:layout_width="wrap_content"
286                                android:layout_height="wrap_content"
287                                android:text="@string/show_inactive_devices" />
288                        </LinearLayout>
289                    </LinearLayout>
290                </com.google.android.material.card.MaterialCardView>
291            </LinearLayout>
292        </ScrollView>
293    </LinearLayout>
294</layout>