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