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: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/muc_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                    <LinearLayout
 42                        android:layout_width="match_parent"
 43                        android:layout_height="wrap_content"
 44                        android:orientation="vertical"
 45                        android:padding="@dimen/card_padding_regular">
 46
 47                        <RelativeLayout
 48                            android:layout_width="fill_parent"
 49                            android:layout_height="wrap_content"
 50                            android:layout_marginBottom="32dp">
 51
 52                            <com.makeramen.roundedimageview.RoundedImageView
 53                                android:id="@+id/your_photo"
 54                                android:layout_width="@dimen/avatar_on_details_screen_size"
 55                                android:layout_height="@dimen/avatar_on_details_screen_size"
 56                                android:layout_alignParentStart="true"
 57                                android:layout_marginEnd="@dimen/avatar_item_distance"
 58                                app:riv_corner_radius="8dp" />
 59
 60                            <LinearLayout
 61                                android:layout_width="fill_parent"
 62                                android:layout_height="wrap_content"
 63                                android:layout_alignParentTop="true"
 64                                android:layout_toEndOf="@+id/your_photo"
 65                                android:orientation="vertical">
 66
 67                                <RelativeLayout
 68                                    android:layout_width="match_parent"
 69                                    android:layout_height="wrap_content">
 70
 71                                    <LinearLayout
 72                                        android:id="@+id/muc_display"
 73                                        android:layout_width="wrap_content"
 74                                        android:layout_height="wrap_content"
 75                                        android:layout_alignParentStart="true"
 76                                        android:layout_toStartOf="@+id/edit_muc_name_button"
 77                                        android:orientation="vertical">
 78
 79                                        <TextView
 80                                            android:id="@+id/muc_title"
 81                                            android:layout_width="wrap_content"
 82                                            android:layout_height="wrap_content"
 83                                            android:textAppearance="?textAppearanceTitleLarge" />
 84
 85                                        <TextView
 86                                            android:id="@+id/muc_subject"
 87                                            android:layout_width="wrap_content"
 88                                            android:layout_height="wrap_content"
 89                                            android:autoLink="web"
 90                                            android:textAppearance="?textAppearanceTitleMedium" />
 91                                    </LinearLayout>
 92
 93
 94                                    <LinearLayout
 95                                        android:id="@+id/muc_editor"
 96                                        android:layout_width="wrap_content"
 97                                        android:layout_height="wrap_content"
 98                                        android:layout_alignParentStart="true"
 99                                        android:layout_toStartOf="@+id/edit_muc_name_button"
100                                        android:orientation="vertical"
101                                        android:visibility="gone">
102
103                                        <com.google.android.material.textfield.TextInputLayout
104                                            android:layout_width="match_parent"
105                                            android:layout_height="wrap_content">
106
107                                            <EditText
108                                                android:id="@+id/muc_edit_title"
109                                                android:layout_width="match_parent"
110                                                android:layout_height="wrap_content"
111                                                android:hint="@string/group_chat_name" />
112                                        </com.google.android.material.textfield.TextInputLayout>
113
114                                        <com.google.android.material.textfield.TextInputLayout
115                                            android:layout_width="match_parent"
116                                            android:layout_height="wrap_content">
117
118                                            <EditText
119                                                android:id="@+id/muc_edit_subject"
120                                                android:layout_width="match_parent"
121                                                android:layout_height="wrap_content"
122                                                android:hint="@string/topic" />
123                                        </com.google.android.material.textfield.TextInputLayout>
124
125                                    </LinearLayout>
126
127                                    <ImageButton
128                                        android:id="@+id/edit_muc_name_button"
129                                        android:layout_width="wrap_content"
130                                        android:layout_height="wrap_content"
131                                        android:layout_alignParentTop="true"
132                                        android:layout_alignParentEnd="true"
133                                        android:background="?attr/selectableItemBackgroundBorderless"
134                                        android:padding="@dimen/image_button_padding"
135                                        android:src="@drawable/ic_edit_24dp" />
136                                </RelativeLayout>
137                            </LinearLayout>
138                        </RelativeLayout>
139
140                        <RelativeLayout
141                            android:id="@+id/muc_settings"
142                            android:layout_width="fill_parent"
143                            android:layout_height="wrap_content">
144
145                            <TextView
146                                android:id="@+id/muc_conference_type"
147                                android:layout_width="wrap_content"
148                                android:layout_height="wrap_content"
149                                android:layout_alignParentStart="true"
150                                android:layout_centerVertical="true"
151                                android:layout_toStartOf="@+id/change_conference_button"
152                                android:textAppearance="?textAppearanceBodyMedium" />
153
154                            <ImageButton
155                                android:id="@+id/change_conference_button"
156                                style="?android:attr/buttonStyleSmall"
157                                android:layout_width="wrap_content"
158                                android:layout_height="wrap_content"
159                                android:layout_alignParentEnd="true"
160                                android:layout_centerVertical="true"
161                                android:layout_gravity="center_horizontal"
162                                android:background="?attr/selectableItemBackgroundBorderless"
163                                android:padding="@dimen/image_button_padding"
164                                android:src="@drawable/ic_settings_24dp" />
165                        </RelativeLayout>
166
167                        <TableLayout
168                            android:id="@+id/muc_info_more"
169                            android:layout_width="match_parent"
170                            android:layout_height="wrap_content"
171                            android:shrinkColumns="0"
172                            android:stretchColumns="1"
173                            android:visibility="gone">
174
175                            <TableRow
176                                android:layout_width="fill_parent"
177                                android:layout_height="match_parent">
178
179                                <TextView
180                                    android:layout_width="wrap_content"
181                                    android:layout_height="wrap_content"
182                                    android:ellipsize="end"
183                                    android:singleLine="true"
184                                    android:text="@string/server_info_mam"
185                                    android:textAppearance="?textAppearanceBodyMedium" />
186
187                                <TextView
188                                    android:id="@+id/muc_info_mam"
189                                    android:layout_width="wrap_content"
190                                    android:layout_height="wrap_content"
191                                    android:layout_gravity="end"
192                                    android:paddingStart="4dp"
193                                    android:paddingLeft="4dp"
194                                    android:textAppearance="?textAppearanceBodyMedium" />
195                            </TableRow>
196
197                        </TableLayout>
198
199                        <TextView
200                            android:id="@+id/jid"
201                            android:layout_width="wrap_content"
202                            android:layout_height="wrap_content"
203                            android:layout_gravity="end"
204                            android:layout_marginTop="32dp"
205                            android:textAppearance="?textAppearanceLabelMedium"
206                            tools:text="foo@bar.tld" />
207                    </LinearLayout>
208                </com.google.android.material.card.MaterialCardView>
209
210                <com.google.android.material.card.MaterialCardView
211                    android:id="@+id/users_wrapper"
212                    android:layout_width="fill_parent"
213                    android:layout_height="wrap_content"
214                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
215                    android:layout_marginTop="@dimen/activity_vertical_margin"
216                    android:layout_marginRight="@dimen/activity_horizontal_margin"
217                    android:layout_marginBottom="@dimen/activity_vertical_margin">
218
219                    <LinearLayout
220                        android:layout_width="match_parent"
221                        android:layout_height="wrap_content"
222                        android:orientation="vertical">
223
224                        <TextView
225                            android:id="@+id/no_users_hints"
226                            android:layout_width="wrap_content"
227                            android:layout_height="wrap_content"
228                            android:paddingStart="@dimen/card_padding_regular"
229                            android:paddingTop="@dimen/card_padding_regular"
230                            android:paddingEnd="@dimen/card_padding_regular"
231                            android:text="@string/no_users_hint_channel"
232                            android:textAppearance="?textAppearanceBodyMedium"
233                            android:textColor="?colorOnSurfaceVariant" />
234
235                        <androidx.recyclerview.widget.RecyclerView
236                            android:id="@+id/users"
237                            android:layout_width="match_parent"
238                            android:layout_height="wrap_content"
239                            android:layout_marginStart="-2dp"
240                            android:layout_marginEnd="-2dp"
241                            android:orientation="horizontal"
242                            android:paddingStart="@dimen/card_padding_regular"
243                            android:paddingTop="@dimen/card_padding_regular"
244                            android:paddingEnd="@dimen/card_padding_regular"
245                            android:paddingBottom="@dimen/card_padding_list" />
246
247                        <LinearLayout
248                            android:layout_width="wrap_content"
249                            android:layout_height="match_parent"
250                            android:layout_gravity="end"
251                            android:orientation="horizontal">
252
253                            <Button
254                                android:id="@+id/invite"
255                                style="@style/Widget.Material3.Button.TextButton"
256                                android:layout_width="wrap_content"
257                                android:layout_height="wrap_content"
258                                android:minWidth="0dp"
259                                android:paddingLeft="16dp"
260                                android:paddingRight="16dp"
261                                android:text="@string/invite" />
262
263                            <Button
264                                android:id="@+id/show_users"
265                                style="@style/Widget.Material3.Button.TextButton"
266                                android:layout_width="wrap_content"
267                                android:layout_height="wrap_content"
268                                android:minWidth="0dp"
269                                android:paddingLeft="16dp"
270                                android:paddingRight="16dp"
271                                tools:text="View n Participants" />
272                        </LinearLayout>
273                    </LinearLayout>
274                </com.google.android.material.card.MaterialCardView>
275
276                <com.google.android.material.card.MaterialCardView
277                    android:layout_width="match_parent"
278                    android:layout_height="wrap_content"
279                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
280                    android:layout_marginTop="@dimen/activity_vertical_margin"
281                    android:layout_marginRight="@dimen/activity_horizontal_margin"
282                    android:layout_marginBottom="@dimen/activity_vertical_margin">
283
284                    <LinearLayout
285                        android:layout_width="match_parent"
286                        android:layout_height="wrap_content"
287                        android:orientation="vertical"
288                        android:padding="@dimen/card_padding_regular">
289
290                        <RelativeLayout
291                            android:layout_width="match_parent"
292                            android:layout_height="wrap_content">
293
294                            <LinearLayout
295                                android:layout_width="fill_parent"
296                                android:layout_height="wrap_content"
297                                android:layout_centerVertical="true"
298                                android:orientation="vertical">
299
300                                <TextView
301                                    android:id="@+id/muc_your_nick"
302                                    android:layout_width="wrap_content"
303                                    android:layout_height="wrap_content"
304                                    android:singleLine="true"
305                                    android:textAppearance="?textAppearanceBodyMedium" />
306
307                                <TextView
308                                    android:id="@+id/muc_role"
309                                    android:layout_width="wrap_content"
310                                    android:layout_height="wrap_content"
311                                    android:singleLine="true"
312                                    android:textAppearance="?textAppearanceBodyMedium" />
313                            </LinearLayout>
314
315                            <ImageButton
316                                android:id="@+id/edit_nick_button"
317                                android:layout_width="wrap_content"
318                                android:layout_height="wrap_content"
319                                android:layout_alignParentEnd="true"
320                                android:layout_centerVertical="true"
321                                android:background="?attr/selectableItemBackgroundBorderless"
322                                android:padding="@dimen/image_button_padding"
323                                android:src="@drawable/ic_edit_24dp" />
324                        </RelativeLayout>
325
326                        <RelativeLayout
327                            android:layout_width="fill_parent"
328                            android:layout_height="wrap_content">
329
330                            <TextView
331                                android:id="@+id/notification_status_text"
332                                android:layout_width="wrap_content"
333                                android:layout_height="wrap_content"
334                                android:layout_alignParentStart="true"
335                                android:layout_centerVertical="true"
336                                android:layout_toStartOf="@+id/notification_status_button"
337                                android:text="@string/notify_on_all_messages"
338                                android:textAppearance="?textAppearanceBodyMedium" />
339
340                            <ImageButton
341                                android:id="@+id/notification_status_button"
342                                style="?android:attr/buttonStyleSmall"
343                                android:layout_width="wrap_content"
344                                android:layout_height="wrap_content"
345                                android:layout_alignParentEnd="true"
346                                android:layout_centerVertical="true"
347                                android:layout_gravity="center_horizontal"
348                                android:background="?attr/selectableItemBackgroundBorderless"
349                                android:padding="@dimen/image_button_padding"
350                                android:src="@drawable/ic_notifications_24dp" />
351                        </RelativeLayout>
352
353                        <TextView
354                            android:id="@+id/details_account"
355                            android:layout_width="wrap_content"
356                            android:layout_height="wrap_content"
357                            android:layout_gravity="end"
358                            android:layout_marginTop="32dp"
359                            android:text="@string/using_account"
360                            android:textAppearance="?textAppearanceLabelMedium" />
361                    </LinearLayout>
362                </com.google.android.material.card.MaterialCardView>
363
364                <com.google.android.material.card.MaterialCardView
365                    android:id="@+id/media_wrapper"
366                    android:layout_width="fill_parent"
367                    android:layout_height="wrap_content"
368                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
369                    android:layout_marginTop="@dimen/activity_vertical_margin"
370                    android:layout_marginRight="@dimen/activity_horizontal_margin"
371                    android:layout_marginBottom="@dimen/activity_vertical_margin">
372
373                    <LinearLayout
374                        android:layout_width="match_parent"
375                        android:layout_height="wrap_content"
376                        android:orientation="vertical">
377
378                        <androidx.recyclerview.widget.RecyclerView
379                            android:id="@+id/media"
380                            android:layout_width="match_parent"
381                            android:layout_height="wrap_content"
382                            android:layout_marginStart="-2dp"
383                            android:layout_marginEnd="-2dp"
384                            android:orientation="horizontal"
385                            android:paddingStart="@dimen/card_padding_regular"
386                            android:paddingTop="@dimen/card_padding_regular"
387                            android:paddingEnd="@dimen/card_padding_regular"
388                            android:paddingBottom="@dimen/card_padding_list" />
389
390                        <LinearLayout
391                            android:layout_width="wrap_content"
392                            android:layout_height="match_parent"
393                            android:layout_gravity="end"
394                            android:layout_margin="16dp"
395                            android:orientation="horizontal">
396
397                            <Button
398                                android:id="@+id/show_media"
399                                style="?attr/materialButtonOutlinedStyle"
400                                android:layout_width="wrap_content"
401                                android:layout_height="wrap_content"
402                                android:text="@string/view_media" />
403                        </LinearLayout>
404                    </LinearLayout>
405                </com.google.android.material.card.MaterialCardView>
406
407            </LinearLayout>
408        </ScrollView>
409    </LinearLayout>
410</layout>