activity_muc_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/muc_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                    <LinearLayout
 43                        android:layout_width="match_parent"
 44                        android:layout_height="wrap_content"
 45                        android:padding="@dimen/card_padding_regular"
 46                        android:orientation="vertical">
 47
 48                        <RelativeLayout
 49                            android:layout_width="fill_parent"
 50                            android:layout_height="wrap_content"
 51                            android:layout_marginBottom="32dp"
 52                            android:paddingHorizontal="@dimen/card_padding_regular">
 53
 54                            <com.google.android.material.imageview.ShapeableImageView
 55                                android:id="@+id/your_photo"
 56                                android:layout_width="@dimen/avatar_on_details_screen_size"
 57                                android:layout_height="@dimen/avatar_on_details_screen_size"
 58                                android:layout_alignParentStart="true"
 59                                app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo"
 60                                android:layout_marginEnd="@dimen/avatar_item_distance" />
 61
 62                            <LinearLayout
 63                                android:layout_width="fill_parent"
 64                                android:layout_height="wrap_content"
 65                                android:layout_alignParentTop="true"
 66                                android:layout_toEndOf="@+id/your_photo"
 67                                android:orientation="vertical">
 68
 69                                <RelativeLayout
 70                                    android:layout_width="match_parent"
 71                                    android:layout_height="wrap_content">
 72
 73                                    <LinearLayout
 74                                        android:id="@+id/muc_display"
 75                                        android:layout_width="wrap_content"
 76                                        android:layout_height="wrap_content"
 77                                        android:layout_alignParentStart="true"
 78                                        android:layout_toStartOf="@+id/edit_muc_name_button"
 79                                        android:orientation="vertical">
 80
 81                                        <TextView
 82                                            android:id="@+id/muc_title"
 83                                            android:layout_width="wrap_content"
 84                                            android:layout_height="wrap_content"
 85                                            android:textAppearance="?textAppearanceTitleLarge" />
 86
 87                                        <TextView
 88                                            android:id="@+id/muc_subject"
 89                                            android:layout_width="wrap_content"
 90                                            android:layout_height="wrap_content"
 91                                            android:textAppearance="?textAppearanceTitleMedium" />
 92
 93                                        <androidx.constraintlayout.widget.ConstraintLayout
 94                                            android:id="@+id/tags"
 95                                            android:layout_width="wrap_content"
 96                                            android:layout_height="wrap_content"
 97                                            android:layout_marginTop="8sp">
 98
 99                                            <androidx.constraintlayout.helper.widget.Flow
100                                                android:id="@+id/flow_widget"
101                                                android:layout_width="0dp"
102                                                android:layout_height="wrap_content"
103                                                app:flow_horizontalBias="0"
104                                                app:flow_horizontalGap="8sp"
105                                                app:flow_horizontalStyle="packed"
106                                                app:flow_verticalGap="4sp"
107                                                app:flow_wrapMode="chain"
108                                                app:layout_constraintEnd_toEndOf="parent"
109                                                app:layout_constraintStart_toStartOf="parent"
110                                                app:layout_constraintTop_toTopOf="parent" />
111                                        </androidx.constraintlayout.widget.ConstraintLayout>
112
113                                    </LinearLayout>
114
115
116                                    <LinearLayout
117                                        android:id="@+id/muc_editor"
118                                        android:layout_width="wrap_content"
119                                        android:layout_height="wrap_content"
120                                        android:layout_alignParentStart="true"
121                                        android:layout_toStartOf="@+id/edit_muc_name_button"
122                                        android:orientation="vertical"
123                                        android:visibility="gone">
124
125                                        <com.google.android.material.textfield.TextInputLayout
126                                            android:layout_width="match_parent"
127                                            android:layout_height="wrap_content">
128
129                                            <EditText
130                                                android:id="@+id/muc_edit_title"
131                                                android:layout_width="match_parent"
132                                                android:layout_height="wrap_content"
133                                                android:hint="@string/group_chat_name" />
134                                        </com.google.android.material.textfield.TextInputLayout>
135
136                                        <com.google.android.material.textfield.TextInputLayout
137                                            android:layout_width="match_parent"
138                                            android:layout_height="wrap_content">
139
140                                            <EditText
141                                                android:id="@+id/muc_edit_subject"
142                                                android:layout_width="match_parent"
143                                                android:layout_height="wrap_content"
144                                                android:hint="@string/topic" />
145                                        </com.google.android.material.textfield.TextInputLayout>
146
147                                        <com.cheogram.android.TagEditorView
148                                            android:id="@+id/edit_tags"
149                                            android:layout_width="match_parent"
150                                            android:layout_height="wrap_content"
151                                            android:hint="Tags"
152                                            android:layout_marginBottom="4dp" />
153
154                                    </LinearLayout>
155
156                                    <ImageButton
157                                        android:id="@+id/edit_muc_name_button"
158                                        android:layout_width="wrap_content"
159                                        android:layout_height="wrap_content"
160                                        android:layout_alignParentTop="true"
161                                        android:layout_alignParentEnd="true"
162                                        android:background="?attr/selectableItemBackgroundBorderless"
163                                        android:padding="@dimen/image_button_padding"
164                                        android:src="@drawable/ic_edit_24dp" />
165                                </RelativeLayout>
166                            </LinearLayout>
167                        </RelativeLayout>
168
169                        <RelativeLayout
170                            android:id="@+id/muc_settings"
171                            android:layout_width="fill_parent"
172                            android:layout_height="wrap_content">
173
174                            <TextView
175                                android:id="@+id/muc_conference_type"
176                                android:layout_width="wrap_content"
177                                android:layout_height="wrap_content"
178                                android:layout_alignParentStart="true"
179                                android:layout_centerVertical="true"
180                                android:layout_toStartOf="@+id/change_conference_button"
181                                android:textAppearance="?textAppearanceBodyMedium" />
182
183                            <ImageButton
184                                android:id="@+id/change_conference_button"
185                                style="?android:attr/buttonStyleSmall"
186                                android:layout_width="wrap_content"
187                                android:layout_height="wrap_content"
188                                android:layout_alignParentEnd="true"
189                                android:layout_centerVertical="true"
190                                android:layout_gravity="center_horizontal"
191                                android:background="?attr/selectableItemBackgroundBorderless"
192                                android:contentDescription="@string/edit_configuration"
193                                android:padding="@dimen/image_button_padding"
194                                android:src="@drawable/ic_settings_24dp" />
195                        </RelativeLayout>
196
197                        <TableLayout
198                            android:id="@+id/muc_info_more"
199                            android:layout_width="match_parent"
200                            android:layout_height="wrap_content"
201                            android:paddingHorizontal="@dimen/card_padding_regular"
202                            android:shrinkColumns="0"
203                            android:stretchColumns="1"
204                            android:visibility="gone">
205
206                            <TableRow
207                                android:layout_width="fill_parent"
208                                android:layout_height="match_parent">
209
210                                <TextView
211                                    android:layout_width="wrap_content"
212                                    android:layout_height="wrap_content"
213                                    android:ellipsize="end"
214                                    android:singleLine="true"
215                                    android:text="@string/server_info_mam"
216                                    android:textAppearance="?textAppearanceBodyMedium" />
217
218                                <TextView
219                                    android:id="@+id/muc_info_mam"
220                                    android:layout_width="wrap_content"
221                                    android:layout_height="wrap_content"
222                                    android:layout_gravity="end"
223                                    android:paddingStart="4dp"
224                                    android:paddingLeft="4dp"
225                                    android:textAppearance="?textAppearanceBodyMedium" />
226                            </TableRow>
227
228                        </TableLayout>
229
230                        <Button
231                            android:id="@+id/relatedMucs"
232                            style="@style/Widget.Material3.Button.TextButton"
233                            android:layout_width="wrap_content"
234                            android:layout_height="wrap_content"
235                            android:layout_gravity="end"
236                            android:minWidth="0dp"
237                            android:layout_marginTop="32dp"
238                            android:layout_marginRight="-13dp"
239                            android:text="Browse Space" />
240
241                        <TextView
242                            android:id="@+id/jid"
243                            android:layout_width="wrap_content"
244                            android:layout_height="wrap_content"
245                            android:layout_gravity="end"
246                            android:layout_marginTop="8dp"
247                            android:textAppearance="?textAppearanceLabelMedium"
248                            tools:text="foo@bar.tld" />
249
250                        <TextView
251                            android:id="@+id/truejid"
252                            android:visibility="gone"
253                            android:layout_width="wrap_content"
254                            android:layout_height="wrap_content"
255                            android:layout_gravity="end"
256                            android:textAppearance="?textAppearanceLabelMedium" />
257                    </LinearLayout>
258                </com.google.android.material.card.MaterialCardView>
259
260                <com.google.android.material.card.MaterialCardView
261                    android:id="@+id/users_wrapper"
262                    android:layout_width="fill_parent"
263                    android:layout_height="wrap_content"
264                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
265                    android:layout_marginTop="@dimen/activity_vertical_margin"
266                    android:layout_marginRight="@dimen/activity_horizontal_margin"
267                    android:layout_marginBottom="@dimen/activity_vertical_margin">
268
269                    <LinearLayout
270                        android:layout_width="match_parent"
271                        android:layout_height="wrap_content"
272                        android:orientation="vertical"
273                        android:padding="@dimen/card_padding_regular">
274
275                        <TextView
276                            android:id="@+id/no_users_hints"
277                            android:layout_width="wrap_content"
278                            android:layout_height="wrap_content"
279                            android:text="@string/no_users_hint_channel"
280                            android:textAppearance="?textAppearanceBodyMedium"
281                            android:textColor="?colorOnSurfaceVariant" />
282
283                        <androidx.recyclerview.widget.RecyclerView
284                            android:id="@+id/users"
285                            android:layout_width="match_parent"
286                            android:layout_height="wrap_content"
287                            android:layout_margin="-2dp"
288                            android:orientation="horizontal" />
289
290                        <LinearLayout
291                            android:layout_width="wrap_content"
292                            android:layout_height="match_parent"
293                            android:layout_gravity="end"
294                            android:layout_marginTop="16dp"
295                            android:orientation="horizontal">
296
297                            <Button
298                                android:id="@+id/invite"
299                                style="@style/Widget.Material3.Button.TextButton"
300                                android:layout_width="wrap_content"
301                                android:layout_height="wrap_content"
302                                android:text="@string/invite" />
303
304                            <Button
305                                android:id="@+id/show_users"
306                                style="@style/Widget.Material3.Button.TextButton"
307                                android:layout_width="wrap_content"
308                                android:layout_height="wrap_content"
309                                tools:text="View n Participants" />
310                        </LinearLayout>
311                    </LinearLayout>
312                </com.google.android.material.card.MaterialCardView>
313
314                <com.google.android.material.card.MaterialCardView
315                    android:layout_width="match_parent"
316                    android:layout_height="wrap_content"
317                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
318                    android:layout_marginTop="@dimen/activity_vertical_margin"
319                    android:layout_marginRight="@dimen/activity_horizontal_margin"
320                    android:layout_marginBottom="@dimen/activity_vertical_margin">
321
322                    <LinearLayout
323                        android:layout_width="match_parent"
324                        android:layout_height="wrap_content"
325                        android:orientation="vertical"
326                        android:padding="@dimen/card_padding_regular">
327
328                        <RelativeLayout
329                            android:layout_width="match_parent"
330                            android:layout_height="wrap_content">
331
332                            <LinearLayout
333                                android:layout_width="fill_parent"
334                                android:layout_height="wrap_content"
335                                android:layout_centerVertical="true"
336                                android:orientation="vertical">
337
338                                <TextView
339                                    android:id="@+id/muc_your_nick"
340                                    android:layout_width="wrap_content"
341                                    android:layout_height="wrap_content"
342                                    android:singleLine="true"
343                                    android:textAppearance="?textAppearanceBodyMedium" />
344
345                                <TextView
346                                    android:id="@+id/muc_role"
347                                    android:layout_width="wrap_content"
348                                    android:layout_height="wrap_content"
349                                    android:singleLine="true"
350                                    android:textAppearance="?textAppearanceBodyMedium" />
351                            </LinearLayout>
352
353                            <ImageButton
354                                android:id="@+id/edit_nick_button"
355                                android:layout_width="wrap_content"
356                                android:layout_height="wrap_content"
357                                android:layout_alignParentEnd="true"
358                                android:layout_centerVertical="true"
359                                android:background="?attr/selectableItemBackgroundBorderless"
360                                android:contentDescription="@string/edit_nick"
361                                android:padding="@dimen/image_button_padding"
362                                android:src="@drawable/ic_edit_24dp" />
363                        </RelativeLayout>
364
365                        <RelativeLayout
366                            android:layout_width="fill_parent"
367                            android:layout_height="wrap_content">
368
369                            <TextView
370                                android:id="@+id/notification_status_text"
371                                android:layout_width="wrap_content"
372                                android:layout_height="wrap_content"
373                                android:layout_alignParentStart="true"
374                                android:layout_centerVertical="true"
375                                android:layout_toStartOf="@+id/notification_status_button"
376                                android:text="@string/notify_on_all_messages"
377                                android:textAppearance="?textAppearanceBodyMedium" />
378
379                            <ImageButton
380                                android:id="@+id/notification_status_button"
381                                style="?android:attr/buttonStyleSmall"
382                                android:layout_width="wrap_content"
383                                android:layout_height="wrap_content"
384                                android:layout_alignParentEnd="true"
385                                android:layout_centerVertical="true"
386                                android:layout_gravity="center_horizontal"
387                                android:background="?attr/selectableItemBackgroundBorderless"
388                                android:contentDescription="@string/change_notification_settings"
389                                android:padding="@dimen/image_button_padding"
390                                android:src="@drawable/ic_notifications_24dp" />
391                        </RelativeLayout>
392
393                        <TextView
394                            android:id="@+id/details_account"
395                            android:layout_width="wrap_content"
396                            android:layout_height="wrap_content"
397                            android:layout_gravity="end"
398                            android:layout_marginTop="32dp"
399                            android:text="@string/using_account"
400                            android:textAppearance="?textAppearanceLabelMedium" />
401                    </LinearLayout>
402                </com.google.android.material.card.MaterialCardView>
403
404                <com.google.android.material.card.MaterialCardView
405                    android:id="@+id/recent_threads_wrapper"
406                    android:layout_width="match_parent"
407                    android:layout_height="wrap_content"
408                    android:layout_marginBottom="@dimen/activity_vertical_margin"
409                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
410                    android:layout_marginRight="@dimen/activity_horizontal_margin"
411                    android:layout_marginTop="@dimen/activity_vertical_margin">
412
413                    <ListView
414                        android:id="@+id/recent_threads"
415                        android:layout_width="fill_parent"
416                        android:layout_height="wrap_content"
417                        android:divider="@android:color/transparent"
418                        android:dividerHeight="0dp"></ListView>
419
420                </com.google.android.material.card.MaterialCardView>
421
422                <com.google.android.material.card.MaterialCardView
423                    android:id="@+id/media_wrapper"
424                    android:layout_width="fill_parent"
425                    android:layout_height="wrap_content"
426                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
427                    android:layout_marginTop="@dimen/activity_vertical_margin"
428                    android:layout_marginRight="@dimen/activity_horizontal_margin"
429                    android:layout_marginBottom="@dimen/activity_vertical_margin">
430
431                    <LinearLayout
432                        android:layout_width="match_parent"
433                        android:layout_height="wrap_content"
434                        android:orientation="vertical"
435                        android:padding="@dimen/card_padding_regular">
436
437                        <RelativeLayout
438                            android:layout_width="match_parent"
439                            android:layout_height="wrap_content">
440
441                            <TextView
442                                android:text="Store media only in cache"
443                                android:layout_width="wrap_content"
444                                android:layout_height="wrap_content"
445                                android:layout_alignParentStart="true"
446                                android:layout_centerVertical="true"
447                                android:singleLine="true"
448                                android:textAppearance="?textAppearanceBodyMedium" />
449
450                            <androidx.appcompat.widget.SwitchCompat
451                                android:id="@+id/store_in_cache"
452                                android:layout_width="wrap_content"
453                                android:layout_height="wrap_content"
454                                android:layout_alignParentEnd="true"
455                                android:layout_centerVertical="true"
456                                android:focusable="false" />
457
458                        </RelativeLayout>
459
460                        <androidx.recyclerview.widget.RecyclerView
461                            android:id="@+id/media"
462                            android:layout_width="match_parent"
463                            android:layout_height="wrap_content"
464                            android:layout_margin="-2dp"
465                            android:orientation="horizontal" />
466
467                        <LinearLayout
468                            android:layout_width="wrap_content"
469                            android:layout_height="match_parent"
470                            android:layout_gravity="end"
471                            android:layout_marginTop="16dp"
472                            android:orientation="horizontal">
473
474                            <Button
475                                android:id="@+id/show_media"
476                                style="?attr/materialButtonOutlinedStyle"
477                                android:layout_width="wrap_content"
478                                android:layout_height="wrap_content"
479                                android:text="@string/view_media" />
480                        </LinearLayout>
481                    </LinearLayout>
482                </com.google.android.material.card.MaterialCardView>
483
484            </LinearLayout>
485        </ScrollView>
486    </LinearLayout>
487</layout>