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: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/details_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                    <RelativeLayout
 35                        android:layout_width="match_parent"
 36                        android:layout_height="wrap_content"
 37                        android:padding="@dimen/card_padding_regular">
 38
 39                        <com.google.android.material.imageview.ShapeableImageView
 40                            android:id="@+id/details_contact_badge"
 41                            android:layout_width="@dimen/avatar_on_details_screen_size"
 42                            android:layout_height="@dimen/avatar_on_details_screen_size"
 43                            android:layout_alignParentTop="true"
 44                            app:strokeColor="@color/custom_theme_accent"
 45                            app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo"
 46                            android:scaleType="centerCrop" />
 47
 48                        <LinearLayout
 49                            android:id="@+id/details_jidbox"
 50                            android:layout_width="wrap_content"
 51                            android:layout_height="wrap_content"
 52                            android:layout_marginLeft="16dp"
 53                            android:layout_toRightOf="@+id/details_contact_badge"
 54                            android:orientation="vertical">
 55
 56                            <TextView
 57                                android:id="@+id/details_contactjid"
 58                                android:layout_width="wrap_content"
 59                                android:layout_height="wrap_content"
 60                                android:text="@string/account_settings_example_jabber_id"
 61                                android:textIsSelectable="true"
 62                                android:textAppearance="@style/TextAppearance.Conversations.Title" />
 63
 64                            <com.wefika.flowlayout.FlowLayout
 65                                android:id="@+id/tags"
 66                                android:layout_width="wrap_content"
 67                                android:layout_height="wrap_content"
 68                                android:layout_marginBottom="4dp"
 69                                android:layout_marginLeft="-2dp"
 70                                android:layout_marginTop="4dp"
 71                                android:orientation="horizontal"></com.wefika.flowlayout.FlowLayout>
 72
 73                            <com.cheogram.android.TagEditorView
 74                                android:id="@+id/edit_tags"
 75                                android:visibility="gone"
 76                                android:hint="Tags"
 77                                android:layout_width="match_parent"
 78                                android:layout_height="wrap_content"
 79                                android:layout_marginBottom="4dp"
 80                                android:layout_marginLeft="-4dp"
 81                                android:layout_marginTop="-4dp" />
 82
 83                            <TextView
 84                                android:id="@+id/details_lastseen"
 85                                android:layout_width="wrap_content"
 86                                android:layout_height="wrap_content"
 87                                android:layout_marginTop="4dp"
 88                                android:textAppearance="@style/TextAppearance.Conversations.Subhead" />
 89
 90                            <TextView
 91                                android:id="@+id/status_message"
 92                                android:layout_width="wrap_content"
 93                                android:layout_height="wrap_content"
 94                                android:layout_marginTop="8dp"
 95                                android:textAppearance="@style/TextAppearance.Conversations.Body1" />
 96
 97                            <Button
 98                                android:id="@+id/add_contact_button"
 99                                android:layout_width="wrap_content"
100                                android:layout_height="wrap_content"
101                                android:layout_marginTop="8dp"
102                                android:text="@string/add_contact" />
103
104                            <CheckBox
105                                android:id="@+id/details_send_presence"
106                                style="@style/Widget.Conversations.CheckBox"
107                                android:layout_width="wrap_content"
108                                android:layout_height="wrap_content"
109                                android:layout_marginTop="8dp"
110                                android:text="@string/send_presence_updates"
111                                android:textAppearance="@style/TextAppearance.Conversations.Body1" />
112
113                            <CheckBox
114                                android:id="@+id/details_receive_presence"
115                                style="@style/Widget.Conversations.CheckBox"
116                                android:layout_width="wrap_content"
117                                android:layout_height="wrap_content"
118                                android:text="@string/receive_presence_updates"
119                                android:textAppearance="@style/TextAppearance.Conversations.Body1" />
120                        </LinearLayout>
121
122                        <TextView
123                            android:id="@+id/details_account"
124                            android:layout_width="wrap_content"
125                            android:layout_height="wrap_content"
126                            android:layout_alignParentRight="true"
127                            android:layout_below="@+id/details_jidbox"
128                            android:layout_marginTop="32dp"
129                            android:text="@string/using_account"
130                            android:textAppearance="@style/TextAppearance.Conversations.Caption" />
131                    </RelativeLayout>
132                </androidx.cardview.widget.CardView>
133
134                <androidx.cardview.widget.CardView
135                    android:id="@+id/profile"
136                    android:layout_width="match_parent"
137                    android:layout_height="wrap_content"
138                    android:layout_marginBottom="@dimen/activity_vertical_margin"
139                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
140                    android:layout_marginRight="@dimen/activity_horizontal_margin"
141                    android:layout_marginTop="@dimen/activity_vertical_margin">
142
143                    <ListView
144                        android:id="@+id/profile_items"
145                        android:layout_width="fill_parent"
146                        android:layout_height="wrap_content"
147                        android:divider="@android:color/transparent"
148                        android:dividerHeight="0dp"></ListView>
149
150                </androidx.cardview.widget.CardView>
151
152                <androidx.cardview.widget.CardView
153                    android:id="@+id/media_wrapper"
154                    android:layout_width="fill_parent"
155                    android:layout_height="wrap_content"
156                    android:layout_marginBottom="@dimen/activity_vertical_margin"
157                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
158                    android:layout_marginRight="@dimen/activity_horizontal_margin"
159                    android:layout_marginTop="@dimen/activity_vertical_margin">
160
161                    <LinearLayout
162                        android:layout_width="match_parent"
163                        android:layout_height="wrap_content"
164                        android:orientation="vertical">
165
166                        <androidx.recyclerview.widget.RecyclerView
167                            android:id="@+id/media"
168                            android:layout_width="match_parent"
169                            android:layout_height="wrap_content"
170                            android:orientation="horizontal"
171                            android:paddingEnd="@dimen/card_padding_regular"
172                            android:paddingStart="@dimen/card_padding_regular"
173                            android:paddingTop="@dimen/card_padding_regular"
174                            android:paddingBottom="@dimen/card_padding_list"
175                            android:layout_marginStart="-2dp"
176                            android:layout_marginEnd="-2dp"/>
177
178                        <LinearLayout
179                            android:layout_width="wrap_content"
180                            android:layout_height="match_parent"
181                            android:orientation="horizontal"
182                            android:layout_gravity="end">
183
184                            <Button
185                                android:id="@+id/show_media"
186                                style="@style/Widget.Conversations.Button.Borderless"
187                                android:layout_width="wrap_content"
188                                android:layout_height="wrap_content"
189                                android:minWidth="0dp"
190                                android:paddingLeft="16dp"
191                                android:paddingRight="16dp"
192                                android:text="@string/view_media"
193                                android:textColor="?attr/colorAccent" />
194                        </LinearLayout>
195                    </LinearLayout>
196                </androidx.cardview.widget.CardView>
197
198                <androidx.cardview.widget.CardView
199                    android:id="@+id/keys_wrapper"
200                    android:layout_width="fill_parent"
201                    android:layout_height="wrap_content"
202                    android:layout_marginBottom="@dimen/activity_vertical_margin"
203                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
204                    android:layout_marginRight="@dimen/activity_horizontal_margin"
205                    android:layout_marginTop="@dimen/activity_vertical_margin">
206
207                    <LinearLayout
208                        android:layout_width="match_parent"
209                        android:layout_height="wrap_content"
210                        android:orientation="vertical">
211
212                        <LinearLayout
213                            android:id="@+id/details_contact_keys"
214                            android:layout_width="match_parent"
215                            android:layout_height="wrap_content"
216                            android:orientation="vertical"
217                            android:padding="@dimen/card_padding_list"/>
218
219                        <LinearLayout
220                            android:id="@+id/unverified_warning"
221                            android:layout_width="match_parent"
222                            android:layout_height="wrap_content"
223                            android:paddingHorizontal="@dimen/card_padding_list">
224                            <TextView
225                                android:layout_marginHorizontal="@dimen/list_padding"
226                                android:layout_width="wrap_content"
227                                android:layout_height="wrap_content"
228                                android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary"
229                                android:text="@string/contact_uses_unverified_keys"/>
230                        </LinearLayout>
231
232                        <LinearLayout
233                            android:layout_width="wrap_content"
234                            android:layout_height="match_parent"
235                            android:layout_marginTop="8dp"
236                            android:orientation="horizontal">
237
238
239                            <Button
240                                android:id="@+id/scan_button"
241                                style="@style/Widget.Conversations.Button.Borderless"
242                                android:layout_width="wrap_content"
243                                android:layout_height="wrap_content"
244                                android:minWidth="0dp"
245                                android:paddingLeft="16dp"
246                                android:paddingRight="16dp"
247                                android:text="@string/scan_qr_code"
248                                android:textColor="?attr/colorAccent" />
249
250                            <Button
251                                android:id="@+id/show_inactive_devices"
252                                style="@style/Widget.Conversations.Button.Borderless"
253                                android:layout_width="wrap_content"
254                                android:layout_height="wrap_content"
255                                android:minWidth="0dp"
256                                android:paddingLeft="16dp"
257                                android:paddingRight="16dp"
258                                android:text="@string/show_inactive_devices"
259                                android:textColor="?attr/colorAccent" />
260                        </LinearLayout>
261                    </LinearLayout>
262                </androidx.cardview.widget.CardView>
263            </LinearLayout>
264        </ScrollView>
265    </LinearLayout>
266</layout>