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