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