activity_edit_account.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<RelativeLayout 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                android:layout_width="match_parent"
  6                android:layout_height="match_parent"
  7                android:background="?attr/color_background_secondary">
  8
  9    <ScrollView
 10        android:layout_width="fill_parent"
 11        android:layout_height="wrap_content"
 12        android:layout_above="@+id/button_bar"
 13        android:layout_alignParentTop="true">
 14
 15        <LinearLayout
 16            android:id="@+id/account_main_layout"
 17            android:layout_width="match_parent"
 18            android:layout_height="wrap_content"
 19            android:orientation="vertical">
 20
 21            <RelativeLayout
 22                android:id="@+id/editor"
 23                android:layout_width="fill_parent"
 24                android:layout_height="wrap_content"
 25                android:layout_marginBottom="@dimen/activity_vertical_margin"
 26                android:layout_marginLeft="@dimen/activity_horizontal_margin"
 27                android:layout_marginRight="@dimen/activity_horizontal_margin"
 28                android:layout_marginTop="@dimen/activity_vertical_margin"
 29                android:background="?attr/infocard_border"
 30                android:orientation="vertical"
 31                android:padding="@dimen/infocard_padding">
 32                <com.makeramen.roundedimageview.RoundedImageView
 33                    android:id="@+id/avater"
 34                    android:layout_width="72dp"
 35                    android:layout_height="72dp"
 36                    android:layout_alignParentTop="true"
 37                    android:layout_marginRight="16dp"
 38                    android:contentDescription="@string/account_image_description"
 39                    app:riv_corner_radius="2dp"/>
 40                <LinearLayout
 41                    android:layout_width="fill_parent"
 42                    android:layout_height="wrap_content"
 43                    android:layout_toRightOf="@+id/avater"
 44                    android:orientation="vertical">
 45                    <TextView
 46                        android:id="@+id/account_jid_label"
 47                        android:layout_width="wrap_content"
 48                        android:layout_height="wrap_content"
 49                        android:text="@string/account_settings_jabber_id"
 50                        android:textColor="?attr/color_text_primary"
 51                        android:textSize="?attr/TextSizeBody"/>
 52
 53                    <AutoCompleteTextView
 54                        android:id="@+id/account_jid"
 55                        android:layout_width="match_parent"
 56                        android:layout_height="wrap_content"
 57                        android:hint="@string/account_settings_example_jabber_id"
 58                        android:inputType="textEmailAddress"
 59                        android:textColor="?attr/color_text_primary"
 60                        android:textColorHint="?attr/color_text_secondary"
 61                        android:textSize="?attr/TextSizeBody"/>
 62
 63                    <TextView
 64                        android:layout_width="wrap_content"
 65                        android:layout_height="wrap_content"
 66                        android:layout_marginTop="8dp"
 67                        android:text="@string/account_settings_password"
 68                        android:textColor="?attr/color_text_primary"
 69                        android:textSize="?attr/TextSizeBody"/>
 70
 71                    <EditText
 72                        android:id="@+id/account_password"
 73                        android:layout_width="match_parent"
 74                        android:layout_height="wrap_content"
 75                        android:hint="@string/password"
 76                        android:inputType="textPassword"
 77                        android:textColor="?attr/color_text_primary"
 78                        android:textColorHint="?attr/color_text_secondary"
 79                        android:textSize="?attr/TextSizeBody"/>
 80
 81                    <LinearLayout
 82                        android:id="@+id/name_port"
 83                        android:layout_width="fill_parent"
 84                        android:layout_height="wrap_content"
 85                        android:layout_marginTop="8dp"
 86                        android:orientation="horizontal"
 87                        android:weightSum="1">
 88                        <LinearLayout
 89                            android:layout_width="0dp"
 90                            android:layout_height="match_parent"
 91                            android:layout_weight="0.8"
 92                            android:orientation="vertical">
 93                            <TextView
 94                                android:id="@+id/textView"
 95                                android:layout_width="wrap_content"
 96                                android:layout_height="wrap_content"
 97                                android:text="@string/account_settings_hostname"
 98                                android:textColor="?attr/color_text_primary"
 99                                android:textSize="?attr/TextSizeBody"/>
100                            <EditText
101                                android:id="@+id/hostname"
102                                android:layout_width="fill_parent"
103                                android:layout_height="wrap_content"
104                                android:hint="@string/hostname_or_onion"
105                                android:inputType="textNoSuggestions"
106                                android:textColor="?attr/color_text_primary"
107                                android:textColorHint="?attr/color_text_secondary"
108                                android:textSize="?attr/TextSizeBody"/>
109                        </LinearLayout>
110                        <LinearLayout
111                            android:layout_width="0dp"
112                            android:layout_height="match_parent"
113                            android:layout_weight="0.2"
114                            android:orientation="vertical"
115                            >
116                            <TextView
117                                android:layout_width="wrap_content"
118                                android:layout_height="wrap_content"
119                                android:text="@string/account_settings_port"
120                                android:textColor="?attr/color_text_primary"
121                                android:textSize="?attr/TextSizeBody"/>
122                            <EditText
123                                android:id="@+id/port"
124                                android:layout_width="match_parent"
125                                android:layout_height="match_parent"
126                                android:inputType="number"
127                                android:maxLength="5"
128                                android:textColor="?attr/color_text_primary"
129                                android:textColorHint="?attr/color_text_secondary"
130                                android:textSize="?attr/TextSizeBody"/>
131                        </LinearLayout>
132                    </LinearLayout>
133                    <CheckBox
134                        android:id="@+id/account_register_new"
135                        android:layout_width="wrap_content"
136                        android:layout_height="wrap_content"
137                        android:layout_marginTop="8dp"
138                        android:text="@string/register_account"
139                        android:textColor="?attr/color_text_primary"
140                        android:textSize="?attr/TextSizeBody"/>
141
142                    <TextView
143                        android:id="@+id/account_confirm_password_desc"
144                        android:layout_width="wrap_content"
145                        android:layout_height="wrap_content"
146                        android:text="@string/account_settings_confirm_password"
147                        android:textColor="?attr/color_text_primary"
148                        android:textSize="?attr/TextSizeBody"
149                        android:visibility="gone"/>
150
151                    <EditText
152                        android:id="@+id/account_password_confirm"
153                        android:layout_width="match_parent"
154                        android:layout_height="wrap_content"
155                        android:layout_marginTop="8dp"
156                        android:hint="@string/confirm_password"
157                        android:inputType="textPassword"
158                        android:textColor="?attr/color_text_primary"
159                        android:textColorHint="?attr/color_text_secondary"
160                        android:textSize="?attr/TextSizeBody"
161                        android:visibility="gone"/>
162                </LinearLayout>
163            </RelativeLayout>
164
165            <RelativeLayout
166                android:id="@+id/battery_optimization"
167                android:layout_width="fill_parent"
168                android:layout_height="wrap_content"
169                android:layout_marginBottom="@dimen/activity_vertical_margin"
170                android:layout_marginLeft="@dimen/activity_horizontal_margin"
171                android:layout_marginRight="@dimen/activity_horizontal_margin"
172                android:layout_marginTop="@dimen/activity_vertical_margin"
173                android:background="?attr/infocard_border"
174                android:orientation="vertical"
175                android:padding="@dimen/infocard_padding"
176                android:visibility="gone">
177                <TextView
178                    android:id="@+id/batt_op_headline"
179                    android:layout_width="wrap_content"
180                    android:layout_height="wrap_content"
181                    android:text="@string/battery_optimizations_enabled"
182                    android:textColor="?attr/color_text_primary"
183                    android:textSize="?attr/TextSizeHeadline"
184                    android:textStyle="bold"/>
185                <TextView
186                    android:id="@+id/batt_op_body"
187                    android:layout_width="wrap_content"
188                    android:layout_height="wrap_content"
189                    android:layout_below="@+id/batt_op_headline"
190                    android:layout_marginBottom="8dp"
191                    android:layout_marginTop="8dp"
192                    android:text="@string/battery_optimizations_enabled_explained"
193                    android:textColor="?attr/color_text_primary"
194                    android:textSize="?attr/TextSizeBody"/>
195                <Button
196                    android:id="@+id/batt_op_disable"
197                    style="?android:attr/borderlessButtonStyle"
198                    android:layout_marginRight="-8dp"
199                    android:layout_width="wrap_content"
200                    android:layout_height="wrap_content"
201                    android:layout_alignParentBottom="true"
202                    android:layout_alignParentEnd="true"
203                    android:layout_alignParentRight="true" android:layout_below="@+id/batt_op_body"
204                    android:text="@string/disable" android:textColor="@color/accent"/>
205            </RelativeLayout>
206
207
208            <LinearLayout
209                android:id="@+id/stats"
210                android:layout_width="fill_parent"
211                android:layout_height="fill_parent"
212                android:layout_marginBottom="@dimen/activity_vertical_margin"
213                android:layout_marginLeft="@dimen/activity_horizontal_margin"
214                android:layout_marginRight="@dimen/activity_horizontal_margin"
215                android:layout_marginTop="@dimen/activity_vertical_margin"
216                android:background="?attr/infocard_border"
217                android:orientation="vertical"
218                android:padding="@dimen/infocard_padding"
219                android:visibility="gone">
220
221                <TableLayout
222                    android:layout_width="match_parent"
223                    android:layout_height="wrap_content"
224                    android:stretchColumns="1">
225
226                    <TableRow
227                        android:layout_width="fill_parent"
228                        android:layout_height="wrap_content"
229                        tools:ignore="UselessParent">
230
231                        <TextView
232                            android:layout_width="wrap_content"
233                            android:layout_height="wrap_content"
234                            android:text="@string/server_info_session_established"
235                            android:textColor="?attr/color_text_primary"
236                            android:textSize="?attr/TextSizeBody"/>
237
238                        <TextView
239                            android:id="@+id/session_est"
240                            android:layout_width="wrap_content"
241                            android:layout_height="wrap_content"
242                            android:layout_gravity="right"
243                            android:textColor="?attr/color_text_primary"
244                            android:textSize="?attr/TextSizeBody"
245                            tools:ignore="RtlHardcoded"/>
246                    </TableRow>
247
248                </TableLayout>
249                <TableLayout
250                    android:id="@+id/server_info_more"
251                    android:layout_width="match_parent"
252                    android:layout_height="wrap_content"
253                    android:stretchColumns="1"
254                    android:visibility="gone">
255
256                    <TableRow
257                        android:layout_width="fill_parent"
258                        android:layout_height="wrap_content">
259
260                        <TextView
261                            android:layout_width="wrap_content"
262                            android:layout_height="wrap_content"
263                            android:text="@string/server_info_pep"
264                            android:textColor="?attr/color_text_primary"
265                            android:textSize="?attr/TextSizeBody"/>
266
267                        <TextView
268                            android:id="@+id/server_info_pep"
269                            android:layout_width="wrap_content"
270                            android:layout_height="wrap_content"
271                            android:layout_gravity="right"
272                            android:textColor="?attr/color_text_primary"
273                            android:textSize="?attr/TextSizeBody"
274                            tools:ignore="RtlHardcoded"/>
275                    </TableRow>
276
277                    <TableRow
278                        android:layout_width="fill_parent"
279                        android:layout_height="wrap_content">
280
281                        <TextView
282                            android:layout_width="wrap_content"
283                            android:layout_height="wrap_content"
284                            android:text="@string/server_info_blocking"
285                            android:textColor="?attr/color_text_primary"
286                            android:textSize="?attr/TextSizeBody"/>
287
288                        <TextView
289                            android:id="@+id/server_info_blocking"
290                            android:layout_width="wrap_content"
291                            android:layout_height="wrap_content"
292                            android:layout_gravity="right"
293                            android:textColor="?attr/color_text_primary"
294                            android:textSize="?attr/TextSizeBody"
295                            tools:ignore="RtlHardcoded"/>
296                    </TableRow>
297
298                    <TableRow
299                        android:layout_width="fill_parent"
300                        android:layout_height="wrap_content">
301
302                        <TextView
303                            android:layout_width="wrap_content"
304                            android:layout_height="wrap_content"
305                            android:text="@string/server_info_stream_management"
306                            android:textColor="?attr/color_text_primary"
307                            android:textSize="?attr/TextSizeBody"/>
308
309                        <TextView
310                            android:id="@+id/server_info_sm"
311                            android:layout_width="wrap_content"
312                            android:layout_height="wrap_content"
313                            android:layout_gravity="right"
314                            android:textColor="?attr/color_text_primary"
315                            android:textSize="?attr/TextSizeBody"
316                            tools:ignore="RtlHardcoded"/>
317                    </TableRow>
318
319                    <TableRow
320                        android:layout_width="fill_parent"
321                        android:layout_height="wrap_content">
322
323                        <TextView
324                            android:layout_width="wrap_content"
325                            android:layout_height="wrap_content"
326                            android:text="@string/server_info_roster_version"
327                            android:textColor="?attr/color_text_primary"
328                            android:textSize="?attr/TextSizeBody"/>
329
330                        <TextView
331                            android:id="@+id/server_info_roster_version"
332                            android:layout_width="wrap_content"
333                            android:layout_height="wrap_content"
334                            android:layout_gravity="right"
335                            android:textColor="?attr/color_text_primary"
336                            android:textSize="?attr/TextSizeBody"
337                            tools:ignore="RtlHardcoded"/>
338                    </TableRow>
339
340                    <TableRow
341                        android:layout_width="fill_parent"
342                        android:layout_height="wrap_content">
343
344                        <TextView
345                            android:layout_width="wrap_content"
346                            android:layout_height="wrap_content"
347                            android:text="@string/server_info_carbon_messages"
348                            android:textColor="?attr/color_text_primary"
349                            android:textSize="?attr/TextSizeBody"/>
350
351                        <TextView
352                            android:id="@+id/server_info_carbons"
353                            android:layout_width="wrap_content"
354                            android:layout_height="wrap_content"
355                            android:layout_gravity="right"
356                            android:textColor="?attr/color_text_primary"
357                            android:textSize="?attr/TextSizeBody"
358                            tools:ignore="RtlHardcoded"/>
359                    </TableRow>
360
361                    <TableRow
362                        android:layout_width="fill_parent"
363                        android:layout_height="wrap_content">
364
365                        <TextView
366                            android:layout_width="wrap_content"
367                            android:layout_height="wrap_content"
368                            android:text="@string/server_info_mam"
369                            android:textColor="?attr/color_text_primary"
370                            android:textSize="?attr/TextSizeBody"/>
371
372                        <TextView
373                            android:id="@+id/server_info_mam"
374                            android:layout_width="wrap_content"
375                            android:layout_height="wrap_content"
376                            android:layout_gravity="right"
377                            android:textColor="?attr/color_text_primary"
378                            android:textSize="?attr/TextSizeBody"
379                            tools:ignore="RtlHardcoded"/>
380                    </TableRow>
381
382                    <TableRow
383                        android:layout_width="fill_parent"
384                        android:layout_height="wrap_content">
385
386                        <TextView
387                            android:layout_width="wrap_content"
388                            android:layout_height="wrap_content"
389                            android:text="@string/server_info_csi"
390                            android:textColor="?attr/color_text_primary"
391                            android:textSize="?attr/TextSizeBody"/>
392
393                        <TextView
394                            android:id="@+id/server_info_csi"
395                            android:layout_width="wrap_content"
396                            android:layout_height="wrap_content"
397                            android:layout_gravity="right"
398                            android:textColor="?attr/color_text_primary"
399                            android:textSize="?attr/TextSizeBody"
400                            tools:ignore="RtlHardcoded"/>
401                    </TableRow>
402                    <TableRow
403                        android:id="@+id/push_row"
404                        android:layout_width="fill_parent"
405                        android:layout_height="wrap_content">
406
407                        <TextView
408                            android:layout_width="wrap_content"
409                            android:layout_height="wrap_content"
410                            android:text="@string/server_info_push"
411                            android:textColor="?attr/color_text_primary"
412                            android:textSize="?attr/TextSizeBody"/>
413
414                        <TextView
415                            android:id="@+id/server_info_push"
416                            android:layout_width="wrap_content"
417                            android:layout_height="wrap_content"
418                            android:layout_gravity="right"
419                            android:textColor="?attr/color_text_primary"
420                            android:textSize="?attr/TextSizeBody"/>
421                    </TableRow>
422                    <TableRow
423                        android:layout_width="fill_parent"
424                        android:layout_height="wrap_content">
425
426                        <TextView
427                            android:layout_width="wrap_content"
428                            android:layout_height="wrap_content"
429                            android:text="@string/server_info_http_upload"
430                            android:textColor="?attr/color_text_primary"
431                            android:textSize="?attr/TextSizeBody"/>
432
433                        <TextView
434                            android:id="@+id/server_info_http_upload"
435                            android:layout_width="wrap_content"
436                            android:layout_height="wrap_content"
437                            android:layout_gravity="right"
438                            android:textColor="?attr/color_text_primary"
439                            android:textSize="?attr/TextSizeBody"/>
440                    </TableRow>
441                </TableLayout>
442
443                <RelativeLayout
444                    android:id="@+id/otr_fingerprint_box"
445                    android:layout_width="wrap_content"
446                    android:layout_height="match_parent"
447                    android:layout_marginTop="32dp">
448
449                    <LinearLayout
450                        android:layout_width="wrap_content"
451                        android:layout_height="wrap_content"
452                        android:layout_alignParentLeft="true"
453                        android:layout_toLeftOf="@+id/action_copy_to_clipboard"
454                        android:orientation="vertical">
455
456                        <TextView
457                            android:id="@+id/otr_fingerprint"
458                            android:layout_width="wrap_content"
459                            android:layout_height="wrap_content"
460                            android:fontFamily="monospace"
461                            android:textColor="?attr/color_text_primary"
462                            android:textSize="?attr/TextSizeBody"
463                            android:typeface="monospace"/>
464
465                        <TextView
466                            android:layout_width="wrap_content"
467                            android:layout_height="wrap_content"
468                            android:text="@string/otr_fingerprint"
469                            android:textColor="?attr/color_text_secondary"
470                            android:textSize="?attr/TextSizeInfo"/>
471                    </LinearLayout>
472
473                    <ImageButton
474                        android:id="@+id/action_copy_to_clipboard"
475                        android:layout_width="wrap_content"
476                        android:layout_height="wrap_content"
477                        android:layout_alignParentRight="true"
478                        android:layout_centerVertical="true"
479                        android:background="?android:selectableItemBackground"
480                        android:contentDescription="@string/copy_otr_clipboard_description"
481                        android:padding="@dimen/image_button_padding"
482                        android:src="?attr/icon_copy"
483                        android:alpha="?attr/icon_alpha"
484                        android:visibility="visible"/>
485                </RelativeLayout>
486                <RelativeLayout
487                    android:id="@+id/axolotl_fingerprint_box"
488                    android:layout_width="wrap_content"
489                    android:layout_height="match_parent"
490                    android:layout_marginTop="32dp">
491
492                    <LinearLayout
493                        android:layout_width="wrap_content"
494                        android:layout_height="wrap_content"
495                        android:layout_alignParentLeft="true"
496                        android:layout_toLeftOf="@+id/axolotl_actions"
497                        android:orientation="vertical">
498
499                        <TextView
500                            android:id="@+id/axolotl_fingerprint"
501                            android:layout_width="wrap_content"
502                            android:layout_height="wrap_content"
503                            android:fontFamily="monospace"
504                            android:textColor="?attr/color_text_primary"
505                            android:textSize="?attr/TextSizeBody"
506                            android:typeface="monospace"/>
507
508                        <TextView
509                            android:id="@+id/own_fingerprint_desc"
510                            android:layout_width="wrap_content"
511                            android:layout_height="wrap_content"
512                            android:text="@string/this_device_omemo_fingerprint"
513                            android:textColor="?attr/color_text_secondary"
514                            android:textSize="?attr/TextSizeInfo"/>
515                    </LinearLayout>
516
517                    <LinearLayout
518                        android:id="@+id/axolotl_actions"
519                        android:layout_width="wrap_content"
520                        android:layout_height="wrap_content"
521                        android:layout_alignParentRight="true"
522                        android:layout_centerVertical="true"
523                        android:orientation="vertical">
524
525                        <ImageButton
526                            android:id="@+id/action_copy_axolotl_to_clipboard"
527                            android:layout_width="wrap_content"
528                            android:layout_height="wrap_content"
529                            android:background="?android:selectableItemBackground"
530                            android:contentDescription="@string/copy_omemo_clipboard_description"
531                            android:padding="@dimen/image_button_padding"
532                            android:src="?attr/icon_copy"
533                            android:alpha="?attr/icon_alpha"
534                            android:visibility="visible"/>
535                        <ImageButton
536                            android:id="@+id/action_regenerate_axolotl_key"
537                            android:layout_width="wrap_content"
538                            android:layout_height="wrap_content"
539                            android:background="?android:selectableItemBackground"
540                            android:contentDescription="@string/regenerate_omemo_key"
541                            android:padding="@dimen/image_button_padding"
542                            android:alpha="?attr/icon_alpha"
543                            android:src="?attr/icon_refresh"
544                            android:visibility="gone"/>
545
546                    </LinearLayout>
547                </RelativeLayout>
548            </LinearLayout>
549            <LinearLayout
550                android:id="@+id/other_device_keys_card"
551                android:layout_width="fill_parent"
552                android:layout_height="wrap_content"
553                android:layout_marginBottom="@dimen/activity_vertical_margin"
554                android:layout_marginLeft="@dimen/activity_horizontal_margin"
555                android:layout_marginRight="@dimen/activity_horizontal_margin"
556                android:layout_marginTop="@dimen/activity_vertical_margin"
557                android:background="?attr/infocard_border"
558                android:orientation="vertical"
559                android:padding="@dimen/infocard_padding"
560                android:visibility="gone">
561
562                <TextView
563                    android:id="@+id/other_device_keys_title"
564                    android:layout_width="wrap_content"
565                    android:layout_height="wrap_content"
566                    android:text="@string/other_devices"
567                    android:textColor="?attr/color_text_primary"
568                    android:textSize="?attr/TextSizeHeadline"
569                    android:textStyle="bold"/>
570
571                <LinearLayout
572                    android:id="@+id/other_device_keys"
573                    android:layout_width="fill_parent"
574                    android:layout_height="wrap_content"
575                    android:divider="?android:dividerHorizontal"
576                    android:orientation="vertical"
577                    android:showDividers="middle">
578                </LinearLayout>
579            </LinearLayout>
580        </LinearLayout>
581    </ScrollView>
582
583    <LinearLayout
584        android:id="@+id/button_bar"
585        android:layout_width="wrap_content"
586        android:layout_height="wrap_content"
587        android:layout_alignParentBottom="true"
588        android:layout_alignParentEnd="true"
589        android:layout_alignParentLeft="true"
590        android:layout_alignParentRight="true"
591        android:layout_alignParentStart="true">
592
593        <Button
594            android:id="@+id/cancel_button"
595            style="?android:attr/borderlessButtonStyle"
596            android:layout_width="0dp"
597            android:layout_height="wrap_content"
598            android:layout_weight="1"
599            android:text="@string/cancel"
600            android:textColor="?attr/color_text_primary"/>
601
602        <View
603            android:layout_width="1dp"
604            android:layout_height="fill_parent"
605            android:layout_marginBottom="7dp"
606            android:layout_marginTop="7dp"
607            android:background="?attr/divider"/>
608
609        <Button
610            android:id="@+id/save_button"
611            style="?android:attr/borderlessButtonStyle"
612            android:layout_width="0dp"
613            android:layout_height="wrap_content"
614            android:layout_weight="1"
615            android:enabled="false"
616            android:text="@string/save"
617            android:textColor="?attr/color_text_secondary"/>
618    </LinearLayout>
619
620</RelativeLayout>