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:textAppearance="?textAppearanceTitleMedium" />
 90                                    </LinearLayout>
 91
 92
 93                                    <LinearLayout
 94                                        android:id="@+id/muc_editor"
 95                                        android:layout_width="wrap_content"
 96                                        android:layout_height="wrap_content"
 97                                        android:layout_alignParentStart="true"
 98                                        android:layout_toStartOf="@+id/edit_muc_name_button"
 99                                        android:orientation="vertical"
100                                        android:visibility="gone">
101
102                                        <com.google.android.material.textfield.TextInputLayout
103                                            android:layout_width="match_parent"
104                                            android:layout_height="wrap_content">
105
106                                            <EditText
107                                                android:id="@+id/muc_edit_title"
108                                                android:layout_width="match_parent"
109                                                android:layout_height="wrap_content"
110                                                android:hint="@string/group_chat_name" />
111                                        </com.google.android.material.textfield.TextInputLayout>
112
113                                        <com.google.android.material.textfield.TextInputLayout
114                                            android:layout_width="match_parent"
115                                            android:layout_height="wrap_content">
116
117                                            <EditText
118                                                android:id="@+id/muc_edit_subject"
119                                                android:layout_width="match_parent"
120                                                android:layout_height="wrap_content"
121                                                android:hint="@string/topic" />
122                                        </com.google.android.material.textfield.TextInputLayout>
123
124                                    </LinearLayout>
125
126                                    <ImageButton
127                                        android:id="@+id/edit_muc_name_button"
128                                        android:layout_width="wrap_content"
129                                        android:layout_height="wrap_content"
130                                        android:layout_alignParentTop="true"
131                                        android:layout_alignParentEnd="true"
132                                        android:background="?attr/selectableItemBackgroundBorderless"
133                                        android:padding="@dimen/image_button_padding"
134                                        android:src="@drawable/ic_edit_24dp" />
135                                </RelativeLayout>
136                            </LinearLayout>
137                        </RelativeLayout>
138
139                        <RelativeLayout
140                            android:id="@+id/muc_settings"
141                            android:layout_width="fill_parent"
142                            android:layout_height="wrap_content">
143
144                            <TextView
145                                android:id="@+id/muc_conference_type"
146                                android:layout_width="wrap_content"
147                                android:layout_height="wrap_content"
148                                android:layout_alignParentStart="true"
149                                android:layout_centerVertical="true"
150                                android:layout_toStartOf="@+id/change_conference_button"
151                                android:textAppearance="?textAppearanceBodyMedium" />
152
153                            <ImageButton
154                                android:id="@+id/change_conference_button"
155                                style="?android:attr/buttonStyleSmall"
156                                android:layout_width="wrap_content"
157                                android:layout_height="wrap_content"
158                                android:layout_alignParentEnd="true"
159                                android:layout_centerVertical="true"
160                                android:layout_gravity="center_horizontal"
161                                android:background="?attr/selectableItemBackgroundBorderless"
162                                android:contentDescription="@string/edit_configuration"
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                        android:padding="@dimen/card_padding_regular">
224
225                        <TextView
226                            android:id="@+id/no_users_hints"
227                            android:layout_width="wrap_content"
228                            android:layout_height="wrap_content"
229                            android:text="@string/no_users_hint_channel"
230                            android:textAppearance="?textAppearanceBodyMedium"
231                            android:textColor="?colorOnSurfaceVariant" />
232
233                        <androidx.recyclerview.widget.RecyclerView
234                            android:id="@+id/users"
235                            android:layout_width="match_parent"
236                            android:layout_height="wrap_content"
237                            android:layout_margin="-2dp"
238                            android:orientation="horizontal" />
239
240                        <LinearLayout
241                            android:layout_width="wrap_content"
242                            android:layout_height="match_parent"
243                            android:layout_gravity="end"
244                            android:layout_marginTop="16dp"
245                            android:orientation="horizontal">
246
247                            <Button
248                                android:id="@+id/invite"
249                                style="@style/Widget.Material3.Button.TextButton"
250                                android:layout_width="wrap_content"
251                                android:layout_height="wrap_content"
252                                android:text="@string/invite" />
253
254                            <Button
255                                android:id="@+id/show_users"
256                                style="@style/Widget.Material3.Button.TextButton"
257                                android:layout_width="wrap_content"
258                                android:layout_height="wrap_content"
259                                tools:text="View n Participants" />
260                        </LinearLayout>
261                    </LinearLayout>
262                </com.google.android.material.card.MaterialCardView>
263
264                <com.google.android.material.card.MaterialCardView
265                    android:layout_width="match_parent"
266                    android:layout_height="wrap_content"
267                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
268                    android:layout_marginTop="@dimen/activity_vertical_margin"
269                    android:layout_marginRight="@dimen/activity_horizontal_margin"
270                    android:layout_marginBottom="@dimen/activity_vertical_margin">
271
272                    <LinearLayout
273                        android:layout_width="match_parent"
274                        android:layout_height="wrap_content"
275                        android:orientation="vertical"
276                        android:padding="@dimen/card_padding_regular">
277
278                        <RelativeLayout
279                            android:layout_width="match_parent"
280                            android:layout_height="wrap_content">
281
282                            <LinearLayout
283                                android:layout_width="fill_parent"
284                                android:layout_height="wrap_content"
285                                android:layout_centerVertical="true"
286                                android:orientation="vertical">
287
288                                <TextView
289                                    android:id="@+id/muc_your_nick"
290                                    android:layout_width="wrap_content"
291                                    android:layout_height="wrap_content"
292                                    android:singleLine="true"
293                                    android:textAppearance="?textAppearanceBodyMedium" />
294
295                                <TextView
296                                    android:id="@+id/muc_role"
297                                    android:layout_width="wrap_content"
298                                    android:layout_height="wrap_content"
299                                    android:singleLine="true"
300                                    android:textAppearance="?textAppearanceBodyMedium" />
301                            </LinearLayout>
302
303                            <ImageButton
304                                android:id="@+id/edit_nick_button"
305                                android:layout_width="wrap_content"
306                                android:layout_height="wrap_content"
307                                android:layout_alignParentEnd="true"
308                                android:layout_centerVertical="true"
309                                android:background="?attr/selectableItemBackgroundBorderless"
310                                android:contentDescription="@string/edit_nick"
311                                android:padding="@dimen/image_button_padding"
312                                android:src="@drawable/ic_edit_24dp" />
313                        </RelativeLayout>
314
315                        <RelativeLayout
316                            android:layout_width="fill_parent"
317                            android:layout_height="wrap_content">
318
319                            <TextView
320                                android:id="@+id/notification_status_text"
321                                android:layout_width="wrap_content"
322                                android:layout_height="wrap_content"
323                                android:layout_alignParentStart="true"
324                                android:layout_centerVertical="true"
325                                android:layout_toStartOf="@+id/notification_status_button"
326                                android:text="@string/notify_on_all_messages"
327                                android:textAppearance="?textAppearanceBodyMedium" />
328
329                            <ImageButton
330                                android:id="@+id/notification_status_button"
331                                style="?android:attr/buttonStyleSmall"
332                                android:layout_width="wrap_content"
333                                android:layout_height="wrap_content"
334                                android:layout_alignParentEnd="true"
335                                android:layout_centerVertical="true"
336                                android:layout_gravity="center_horizontal"
337                                android:background="?attr/selectableItemBackgroundBorderless"
338                                android:contentDescription="@string/change_notification_settings"
339                                android:padding="@dimen/image_button_padding"
340                                android:src="@drawable/ic_notifications_24dp" />
341                        </RelativeLayout>
342
343                        <TextView
344                            android:id="@+id/details_account"
345                            android:layout_width="wrap_content"
346                            android:layout_height="wrap_content"
347                            android:layout_gravity="end"
348                            android:layout_marginTop="32dp"
349                            android:text="@string/using_account"
350                            android:textAppearance="?textAppearanceLabelMedium" />
351                    </LinearLayout>
352                </com.google.android.material.card.MaterialCardView>
353
354                <com.google.android.material.card.MaterialCardView
355                    android:id="@+id/media_wrapper"
356                    android:layout_width="fill_parent"
357                    android:layout_height="wrap_content"
358                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
359                    android:layout_marginTop="@dimen/activity_vertical_margin"
360                    android:layout_marginRight="@dimen/activity_horizontal_margin"
361                    android:layout_marginBottom="@dimen/activity_vertical_margin">
362
363                    <LinearLayout
364                        android:layout_width="match_parent"
365                        android:layout_height="wrap_content"
366                        android:orientation="vertical"
367                        android:padding="@dimen/card_padding_regular">
368
369                        <androidx.recyclerview.widget.RecyclerView
370                            android:id="@+id/media"
371                            android:layout_width="match_parent"
372                            android:layout_height="wrap_content"
373                            android:layout_margin="-2dp"
374                            android:orientation="horizontal" />
375
376                        <LinearLayout
377                            android:layout_width="wrap_content"
378                            android:layout_height="match_parent"
379                            android:layout_gravity="end"
380                            android:layout_marginTop="16dp"
381                            android:orientation="horizontal">
382
383                            <Button
384                                android:id="@+id/show_media"
385                                style="?attr/materialButtonOutlinedStyle"
386                                android:layout_width="wrap_content"
387                                android:layout_height="wrap_content"
388                                android:text="@string/view_media" />
389                        </LinearLayout>
390                    </LinearLayout>
391                </com.google.android.material.card.MaterialCardView>
392
393            </LinearLayout>
394        </ScrollView>
395    </LinearLayout>
396</layout>