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:background="?attr/color_background_secondary"
 10        android:orientation="vertical">
 11
 12        <include
 13            android:id="@+id/toolbar"
 14            layout="@layout/toolbar"/>
 15
 16        <ScrollView
 17            android:layout_width="fill_parent"
 18            android:layout_height="fill_parent">
 19
 20            <LinearLayout
 21                android:id="@+id/muc_main_layout"
 22                android:layout_width="fill_parent"
 23                android:layout_height="wrap_content"
 24                android:orientation="vertical">
 25
 26                <androidx.cardview.widget.CardView
 27                    android:layout_width="match_parent"
 28                    android:layout_height="wrap_content"
 29                    android:layout_marginBottom="@dimen/activity_vertical_margin"
 30                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
 31                    android:layout_marginRight="@dimen/activity_horizontal_margin"
 32                    android:layout_marginTop="@dimen/activity_vertical_margin">
 33
 34                    <LinearLayout
 35                        android:layout_width="match_parent"
 36                        android:layout_height="wrap_content"
 37                        android:orientation="vertical"
 38                        android:padding="@dimen/card_padding_regular">
 39
 40                        <RelativeLayout
 41                            android:layout_width="fill_parent"
 42                            android:layout_height="wrap_content"
 43                            android:layout_marginBottom="32dp">
 44
 45                            <com.google.android.material.imageview.ShapeableImageView
 46                                android:id="@+id/your_photo"
 47                                android:layout_width="@dimen/avatar_on_details_screen_size"
 48                                android:layout_height="@dimen/avatar_on_details_screen_size"
 49                                android:layout_alignParentStart="true"
 50                                app:strokeColor="@color/custom_theme_accent"
 51                                app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo"
 52                                android:layout_marginEnd="@dimen/avatar_item_distance"
 53                                android:layout_alignParentLeft="true"
 54                                android:layout_marginRight="@dimen/avatar_item_distance" />
 55
 56                            <LinearLayout
 57                                android:layout_width="fill_parent"
 58                                android:layout_height="wrap_content"
 59                                android:layout_alignParentTop="true"
 60                                android:layout_toEndOf="@+id/your_photo"
 61                                android:orientation="vertical"
 62                                android:layout_toRightOf="@+id/your_photo">
 63
 64                                <RelativeLayout
 65                                    android:layout_width="match_parent"
 66                                    android:layout_height="wrap_content">
 67
 68                                    <LinearLayout
 69                                        android:id="@+id/muc_display"
 70                                        android:layout_width="wrap_content"
 71                                        android:layout_height="wrap_content"
 72                                        android:layout_alignParentStart="true"
 73                                        android:layout_toStartOf="@+id/edit_muc_name_button"
 74                                        android:orientation="vertical"
 75                                        android:layout_alignParentLeft="true"
 76                                        android:layout_toLeftOf="@+id/edit_muc_name_button">
 77
 78                                        <TextView
 79                                            android:id="@+id/muc_title"
 80                                            android:layout_width="wrap_content"
 81                                            android:layout_height="wrap_content"
 82                                            android:textAppearance="@style/TextAppearance.Conversations.Title"/>
 83
 84                                        <TextView
 85                                            android:id="@+id/muc_subject"
 86                                            android:layout_width="wrap_content"
 87                                            android:layout_height="wrap_content"
 88                                            android:autoLink="web"
 89                                            android:textAppearance="@style/TextAppearance.Conversations.Subhead"/>
 90
 91                                        <com.wefika.flowlayout.FlowLayout
 92                                            android:id="@+id/tags"
 93                                            android:layout_width="wrap_content"
 94                                            android:layout_height="wrap_content"
 95                                            android:layout_marginBottom="4dp"
 96                                            android:layout_marginLeft="-2dp"
 97                                            android:layout_marginTop="4dp"
 98                                            android:orientation="horizontal"></com.wefika.flowlayout.FlowLayout>
 99
100                                    </LinearLayout>
101
102
103                                    <LinearLayout
104                                        android:id="@+id/muc_editor"
105                                        android:layout_width="wrap_content"
106                                        android:layout_height="wrap_content"
107                                        android:layout_alignParentStart="true"
108                                        android:layout_toStartOf="@+id/edit_muc_name_button"
109                                        android:orientation="vertical"
110                                        android:visibility="gone"
111                                        android:layout_alignParentLeft="true"
112                                        android:layout_toLeftOf="@+id/edit_muc_name_button">
113
114                                        <com.google.android.material.textfield.TextInputLayout
115                                            android:layout_width="match_parent"
116                                            android:layout_height="wrap_content"
117                                            app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"
118                                            app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint">
119
120                                            <EditText
121                                                android:id="@+id/muc_edit_title"
122                                                android:layout_width="match_parent"
123                                                android:layout_height="wrap_content"
124                                                android:hint="@string/group_chat_name"
125                                                android:textAppearance="@style/Widget.Conversations.EditText"/>
126                                        </com.google.android.material.textfield.TextInputLayout>
127
128                                        <com.google.android.material.textfield.TextInputLayout
129                                            android:layout_width="match_parent"
130                                            android:layout_height="wrap_content"
131                                            app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error"
132                                            app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint">
133
134                                            <EditText
135                                                android:id="@+id/muc_edit_subject"
136                                                android:layout_width="match_parent"
137                                                android:layout_height="wrap_content"
138                                                android:hint="@string/topic"
139                                                android:textAppearance="@style/Widget.Conversations.EditText"/>
140                                        </com.google.android.material.textfield.TextInputLayout>
141
142                                        <com.cheogram.android.TagEditorView
143                                            android:id="@+id/edit_tags"
144                                            android:layout_width="match_parent"
145                                            android:layout_height="wrap_content"
146                                            android:hint="Tags"
147                                            android:layout_marginBottom="4dp" />
148
149                                    </LinearLayout>
150
151                                    <ImageButton
152                                        android:id="@+id/edit_muc_name_button"
153                                        android:layout_width="wrap_content"
154                                        android:layout_height="wrap_content"
155                                        android:layout_alignParentEnd="true"
156                                        android:layout_alignParentTop="true"
157                                        android:alpha="?attr/icon_alpha"
158                                        android:background="?attr/selectableItemBackgroundBorderless"
159                                        android:padding="@dimen/image_button_padding"
160                                        android:src="?attr/icon_edit_body"
161                                        android:layout_alignParentRight="true" />
162                                </RelativeLayout>
163                            </LinearLayout>
164                        </RelativeLayout>
165
166                        <RelativeLayout
167                            android:id="@+id/muc_settings"
168                            android:layout_width="fill_parent"
169                            android:layout_height="wrap_content">
170
171                            <TextView
172                                android:id="@+id/muc_conference_type"
173                                android:layout_width="wrap_content"
174                                android:layout_height="wrap_content"
175                                android:layout_alignParentStart="true"
176                                android:layout_centerVertical="true"
177                                android:layout_toStartOf="@+id/change_conference_button"
178                                android:textAppearance="@style/TextAppearance.Conversations.Body1"
179                                android:layout_alignParentLeft="true"
180                                android:layout_toLeftOf="@+id/change_conference_button" />
181
182                            <ImageButton
183                                android:id="@+id/change_conference_button"
184                                style="?android:attr/buttonStyleSmall"
185                                android:layout_width="wrap_content"
186                                android:layout_height="wrap_content"
187                                android:layout_alignParentEnd="true"
188                                android:layout_centerVertical="true"
189                                android:layout_gravity="center_horizontal"
190                                android:alpha="?attr/icon_alpha"
191                                android:background="?attr/selectableItemBackgroundBorderless"
192                                android:padding="@dimen/image_button_padding"
193                                android:src="?attr/icon_settings"
194                                android:layout_alignParentRight="true" />
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:shrinkColumns="0"
202                            android:stretchColumns="1"
203                            android:visibility="gone">
204
205                            <TableRow
206                                android:layout_width="fill_parent"
207                                android:layout_height="match_parent">
208
209                                <TextView
210                                    android:layout_width="wrap_content"
211                                    android:layout_height="wrap_content"
212                                    android:ellipsize="end"
213                                    android:singleLine="true"
214                                    android:text="@string/server_info_mam"
215                                    android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
216
217                                <TextView
218                                    android:id="@+id/muc_info_mam"
219                                    android:layout_width="wrap_content"
220                                    android:layout_height="wrap_content"
221                                    android:layout_gravity="end"
222                                    android:paddingStart="4dp"
223                                    android:textAppearance="@style/TextAppearance.Conversations.Body1"
224                                    android:paddingLeft="4dp" />
225                            </TableRow>
226
227                        </TableLayout>
228
229                        <TextView
230                            android:id="@+id/jid"
231                            android:layout_width="wrap_content"
232                            android:layout_height="wrap_content"
233                            android:layout_gravity="end"
234                            android:layout_marginTop="32dp"
235                            android:textAppearance="@style/TextAppearance.Conversations.Caption"/>
236
237                        <TextView
238                            android:id="@+id/truejid"
239                            android:visibility="gone"
240                            android:layout_width="wrap_content"
241                            android:layout_height="wrap_content"
242                            android:layout_gravity="end"
243                            android:textAppearance="@style/TextAppearance.Conversations.Caption"/>
244                    </LinearLayout>
245                </androidx.cardview.widget.CardView>
246
247                <androidx.cardview.widget.CardView
248                    android:id="@+id/users_wrapper"
249                    android:layout_width="fill_parent"
250                    android:layout_height="wrap_content"
251                    android:layout_marginBottom="@dimen/activity_vertical_margin"
252                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
253                    android:layout_marginRight="@dimen/activity_horizontal_margin"
254                    android:layout_marginTop="@dimen/activity_vertical_margin">
255
256                    <LinearLayout
257                        android:layout_width="match_parent"
258                        android:layout_height="wrap_content"
259                        android:orientation="vertical">
260
261                        <TextView
262                            android:id="@+id/no_users_hints"
263                            android:layout_width="wrap_content"
264                            android:layout_height="wrap_content"
265                            android:paddingTop="@dimen/card_padding_regular"
266                            android:paddingEnd="@dimen/card_padding_regular"
267                            android:paddingStart="@dimen/card_padding_regular"
268                            android:text="@string/no_users_hint_channel"
269                            android:textAppearance="@style/TextAppearance.Conversations.Body2"/>
270
271                        <androidx.recyclerview.widget.RecyclerView
272                            android:id="@+id/users"
273                            android:layout_width="match_parent"
274                            android:layout_height="wrap_content"
275                            android:orientation="horizontal"
276                            android:paddingEnd="@dimen/card_padding_regular"
277                            android:paddingStart="@dimen/card_padding_regular"
278                            android:paddingTop="@dimen/card_padding_regular"
279                            android:paddingBottom="@dimen/card_padding_list"
280                            android:layout_marginStart="-2dp"
281                            android:layout_marginEnd="-2dp"/>
282
283                        <LinearLayout
284                            android:layout_width="wrap_content"
285                            android:layout_height="match_parent"
286                            android:orientation="horizontal"
287                            android:layout_gravity="end">
288
289                            <Button
290                                android:id="@+id/invite"
291                                style="@style/Widget.Conversations.Button.Borderless"
292                                android:layout_width="wrap_content"
293                                android:layout_height="wrap_content"
294                                android:minWidth="0dp"
295                                android:paddingLeft="16dp"
296                                android:paddingRight="16dp"
297                                android:text="@string/invite"
298                                android:textColor="?attr/colorAccent" />
299
300                            <Button
301                                android:id="@+id/show_users"
302                                style="@style/Widget.Conversations.Button.Borderless"
303                                android:layout_width="wrap_content"
304                                android:layout_height="wrap_content"
305                                android:minWidth="0dp"
306                                android:paddingLeft="16dp"
307                                android:paddingRight="16dp"
308                                tools:text="View n Participants"
309                                android:textColor="?attr/colorAccent" />
310                        </LinearLayout>
311                    </LinearLayout>
312                </androidx.cardview.widget.CardView>
313
314                <androidx.cardview.widget.CardView
315                    android:layout_width="match_parent"
316                    android:layout_height="wrap_content"
317                    android:layout_marginBottom="@dimen/activity_vertical_margin"
318                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
319                    android:layout_marginRight="@dimen/activity_horizontal_margin"
320                    android:layout_marginTop="@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="@style/TextAppearance.Conversations.Subhead"/>
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="@style/TextAppearance.Conversations.Body1.Secondary"/>
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:alpha="?attr/icon_alpha"
360                                android:background="?attr/selectableItemBackgroundBorderless"
361                                android:padding="@dimen/image_button_padding"
362                                android:src="?attr/icon_edit_body"
363                                android:layout_alignParentRight="true" />
364                        </RelativeLayout>
365
366                        <RelativeLayout
367                            android:layout_width="fill_parent"
368                            android:layout_height="wrap_content">
369
370                            <TextView
371                                android:id="@+id/notification_status_text"
372                                android:layout_width="wrap_content"
373                                android:layout_height="wrap_content"
374                                android:layout_alignParentStart="true"
375                                android:layout_centerVertical="true"
376                                android:layout_toStartOf="@+id/notification_status_button"
377                                android:text="@string/notify_on_all_messages"
378                                android:textAppearance="@style/TextAppearance.Conversations.Body1"
379                                android:layout_alignParentLeft="true"
380                                android:layout_toLeftOf="@+id/notification_status_button" />
381
382                            <ImageButton
383                                android:id="@+id/notification_status_button"
384                                style="?android:attr/buttonStyleSmall"
385                                android:layout_width="wrap_content"
386                                android:layout_height="wrap_content"
387                                android:layout_alignParentEnd="true"
388                                android:layout_centerVertical="true"
389                                android:layout_gravity="center_horizontal"
390                                android:alpha="?attr/icon_alpha"
391                                android:background="?attr/selectableItemBackgroundBorderless"
392                                android:padding="@dimen/image_button_padding"
393                                android:src="?attr/icon_notifications"
394                                android:layout_alignParentRight="true" />
395                        </RelativeLayout>
396
397                        <TextView
398                            android:id="@+id/details_account"
399                            android:layout_width="wrap_content"
400                            android:layout_height="wrap_content"
401                            android:layout_gravity="end"
402                            android:layout_marginTop="32dp"
403                            android:text="@string/using_account"
404                            android:textAppearance="@style/TextAppearance.Conversations.Caption"/>
405                    </LinearLayout>
406                </androidx.cardview.widget.CardView>
407                <androidx.cardview.widget.CardView
408                    android:id="@+id/media_wrapper"
409                    android:layout_width="fill_parent"
410                    android:layout_height="wrap_content"
411                    android:layout_marginBottom="@dimen/activity_vertical_margin"
412                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
413                    android:layout_marginRight="@dimen/activity_horizontal_margin"
414                    android:layout_marginTop="@dimen/activity_vertical_margin">
415
416                    <LinearLayout
417                        android:layout_width="match_parent"
418                        android:layout_height="wrap_content"
419                        android:orientation="vertical">
420
421                        <androidx.recyclerview.widget.RecyclerView
422                            android:id="@+id/media"
423                            android:layout_width="match_parent"
424                            android:layout_height="wrap_content"
425                            android:orientation="horizontal"
426                            android:paddingEnd="@dimen/card_padding_regular"
427                            android:paddingStart="@dimen/card_padding_regular"
428                            android:paddingTop="@dimen/card_padding_regular"
429                            android:paddingBottom="@dimen/card_padding_list"
430                            android:layout_marginStart="-2dp"
431                            android:layout_marginEnd="-2dp"/>
432
433                        <LinearLayout
434                            android:layout_width="wrap_content"
435                            android:layout_height="match_parent"
436                            android:orientation="horizontal"
437                            android:layout_gravity="end">
438
439                            <Button
440                                android:id="@+id/show_media"
441                                style="@style/Widget.Conversations.Button.Borderless"
442                                android:layout_width="wrap_content"
443                                android:layout_height="wrap_content"
444                                android:minWidth="0dp"
445                                android:paddingLeft="16dp"
446                                android:paddingRight="16dp"
447                                android:text="@string/view_media"
448                                android:textColor="?attr/colorAccent" />
449                        </LinearLayout>
450                    </LinearLayout>
451                </androidx.cardview.widget.CardView>
452
453            </LinearLayout>
454        </ScrollView>
455    </LinearLayout>
456</layout>