activity_contact_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/details_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                    <RelativeLayout
 42                        android:layout_width="match_parent"
 43                        android:layout_height="wrap_content"
 44                        android:padding="@dimen/card_padding_regular">
 45
 46                        <com.makeramen.roundedimageview.RoundedImageView
 47                            android:id="@+id/details_contact_badge"
 48                            android:layout_width="@dimen/avatar_on_details_screen_size"
 49                            android:layout_height="@dimen/avatar_on_details_screen_size"
 50                            android:layout_alignParentTop="true"
 51                            android:scaleType="centerCrop"
 52                            app:riv_corner_radius="8dp" />
 53
 54                        <LinearLayout
 55                            android:id="@+id/details_jidbox"
 56                            android:layout_width="wrap_content"
 57                            android:layout_height="wrap_content"
 58                            android:layout_marginLeft="16dp"
 59                            android:layout_toRightOf="@+id/details_contact_badge"
 60                            android:orientation="vertical">
 61
 62                            <TextView
 63                                android:id="@+id/details_contactjid"
 64                                android:layout_width="wrap_content"
 65                                android:layout_height="wrap_content"
 66                                android:text="@string/account_settings_example_jabber_id"
 67                                android:textAppearance="?textAppearanceTitleMedium" />
 68
 69                            <com.wefika.flowlayout.FlowLayout
 70                                android:id="@+id/tags"
 71                                android:layout_width="wrap_content"
 72                                android:layout_height="wrap_content"
 73                                android:layout_marginLeft="-2dp"
 74                                android:layout_marginTop="4dp"
 75                                android:layout_marginBottom="4dp"
 76                                android:orientation="horizontal" />
 77
 78                            <TextView
 79                                android:id="@+id/details_lastseen"
 80                                android:layout_width="wrap_content"
 81                                android:layout_height="wrap_content"
 82                                android:layout_marginTop="4dp"
 83                                android:textAppearance="?textAppearanceTitleSmall"
 84                                tools:text="@string/just_now" />
 85
 86                            <TextView
 87                                android:id="@+id/status_message"
 88                                android:layout_width="wrap_content"
 89                                android:layout_height="wrap_content"
 90                                android:layout_marginTop="8dp"
 91                                android:textAppearance="?textAppearanceBodyMedium"
 92                                tools:text="Hey there! I’m using Conversations" />
 93
 94                            <Button
 95                                android:id="@+id/add_contact_button"
 96                                style="@style/Widget.Material3.Button.ElevatedButton"
 97                                android:layout_width="wrap_content"
 98                                android:layout_height="wrap_content"
 99                                android:layout_marginTop="8dp"
100                                android:text="@string/add_contact" />
101
102                            <CheckBox
103                                android:id="@+id/details_send_presence"
104                                android:layout_width="wrap_content"
105                                android:layout_height="wrap_content"
106                                android:layout_marginTop="8dp"
107                                android:text="@string/send_presence_updates" />
108
109                            <CheckBox
110                                android:id="@+id/details_receive_presence"
111                                android:layout_width="wrap_content"
112                                android:layout_height="wrap_content"
113                                android:text="@string/receive_presence_updates" />
114                        </LinearLayout>
115
116                        <TextView
117                            android:id="@+id/details_account"
118                            android:layout_width="wrap_content"
119                            android:layout_height="wrap_content"
120                            android:layout_below="@+id/details_jidbox"
121                            android:layout_alignParentEnd="true"
122                            android:layout_marginTop="32dp"
123                            android:text="@string/using_account"
124                            android:textAppearance="?textAppearanceLabelMedium" />
125                    </RelativeLayout>
126                </com.google.android.material.card.MaterialCardView>
127
128                <com.google.android.material.card.MaterialCardView
129                    android:id="@+id/media_wrapper"
130                    android:layout_width="fill_parent"
131                    android:layout_height="wrap_content"
132                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
133                    android:layout_marginTop="@dimen/activity_vertical_margin"
134                    android:layout_marginRight="@dimen/activity_horizontal_margin"
135                    android:layout_marginBottom="@dimen/activity_vertical_margin">
136
137                    <LinearLayout
138                        android:layout_width="match_parent"
139                        android:layout_height="wrap_content"
140                        android:orientation="vertical"
141                        android:padding="@dimen/card_padding_regular">
142
143                        <androidx.recyclerview.widget.RecyclerView
144                            android:id="@+id/media"
145                            android:layout_width="match_parent"
146                            android:layout_height="wrap_content"
147                            android:layout_margin="-2dp"
148                            android:orientation="horizontal" />
149
150                        <LinearLayout
151                            android:layout_width="wrap_content"
152                            android:layout_height="match_parent"
153                            android:layout_gravity="end"
154                            android:layout_marginTop="16dp"
155                            android:orientation="horizontal">
156
157                            <Button
158                                android:id="@+id/show_media"
159                                style="?attr/materialButtonOutlinedStyle"
160                                android:layout_width="wrap_content"
161                                android:layout_height="wrap_content"
162                                android:text="@string/view_media" />
163                        </LinearLayout>
164                    </LinearLayout>
165                </com.google.android.material.card.MaterialCardView>
166
167                <com.google.android.material.card.MaterialCardView
168                    android:id="@+id/keys_wrapper"
169                    android:layout_width="fill_parent"
170                    android:layout_height="wrap_content"
171                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
172                    android:layout_marginTop="@dimen/activity_vertical_margin"
173                    android:layout_marginRight="@dimen/activity_horizontal_margin"
174                    android:layout_marginBottom="@dimen/activity_vertical_margin">
175
176                    <LinearLayout
177                        android:layout_width="match_parent"
178                        android:layout_height="wrap_content"
179                        android:orientation="vertical">
180
181                        <LinearLayout
182                            android:id="@+id/details_contact_keys"
183                            android:layout_width="match_parent"
184                            android:layout_height="wrap_content"
185                            android:orientation="vertical"
186                            android:padding="@dimen/card_padding_list" />
187
188                        <LinearLayout
189                            android:id="@+id/unverified_warning"
190                            android:layout_width="match_parent"
191                            android:layout_height="wrap_content"
192                            android:paddingHorizontal="@dimen/card_padding_list">
193
194                            <TextView
195                                android:layout_width="wrap_content"
196                                android:layout_height="wrap_content"
197                                android:layout_marginHorizontal="@dimen/list_padding"
198                                android:text="@string/contact_uses_unverified_keys"
199                                android:textAppearance="?textAppearanceBodyMedium"
200                                android:textColor="?colorOnSurfaceVariant" />
201                        </LinearLayout>
202
203                        <LinearLayout
204                            android:layout_width="wrap_content"
205                            android:layout_height="match_parent"
206                            android:layout_marginTop="8dp"
207                            android:orientation="horizontal"
208                            android:padding="@dimen/card_padding_list">
209
210
211                            <Button
212                                android:id="@+id/scan_button"
213                                style="@style/Widget.Material3.Button.TextButton"
214                                android:layout_width="wrap_content"
215                                android:layout_height="wrap_content"
216                                android:text="@string/scan_qr_code" />
217
218                            <Button
219                                android:id="@+id/show_inactive_devices"
220                                style="@style/Widget.Material3.Button.TextButton"
221                                android:layout_width="wrap_content"
222                                android:layout_height="wrap_content"
223                                android:text="@string/show_inactive_devices" />
224                        </LinearLayout>
225                    </LinearLayout>
226                </com.google.android.material.card.MaterialCardView>
227            </LinearLayout>
228        </ScrollView>
229    </LinearLayout>
230</layout>