diff options
Diffstat (limited to 'src/main/res')
20 files changed, 160 insertions, 77 deletions
diff --git a/src/main/res/drawable-hdpi/ic_archive_white_24dp.png b/src/main/res/drawable-hdpi/ic_archive_white_24dp.png Binary files differnew file mode 100644 index 000000000..1f109a958 --- /dev/null +++ b/src/main/res/drawable-hdpi/ic_archive_white_24dp.png diff --git a/src/main/res/drawable-hdpi/ic_unarchive_white_24dp.png b/src/main/res/drawable-hdpi/ic_unarchive_white_24dp.png Binary files differnew file mode 100644 index 000000000..a32579aa8 --- /dev/null +++ b/src/main/res/drawable-hdpi/ic_unarchive_white_24dp.png diff --git a/src/main/res/drawable-mdpi/ic_archive_white_24dp.png b/src/main/res/drawable-mdpi/ic_archive_white_24dp.png Binary files differnew file mode 100644 index 000000000..7944feb2a --- /dev/null +++ b/src/main/res/drawable-mdpi/ic_archive_white_24dp.png diff --git a/src/main/res/drawable-mdpi/ic_unarchive_white_24dp.png b/src/main/res/drawable-mdpi/ic_unarchive_white_24dp.png Binary files differnew file mode 100644 index 000000000..0480fea98 --- /dev/null +++ b/src/main/res/drawable-mdpi/ic_unarchive_white_24dp.png diff --git a/src/main/res/drawable-xhdpi/ic_archive_white_24dp.png b/src/main/res/drawable-xhdpi/ic_archive_white_24dp.png Binary files differnew file mode 100644 index 000000000..9d1d46a5d --- /dev/null +++ b/src/main/res/drawable-xhdpi/ic_archive_white_24dp.png diff --git a/src/main/res/drawable-xhdpi/ic_unarchive_white_24dp.png b/src/main/res/drawable-xhdpi/ic_unarchive_white_24dp.png Binary files differnew file mode 100644 index 000000000..04e607bd4 --- /dev/null +++ b/src/main/res/drawable-xhdpi/ic_unarchive_white_24dp.png diff --git a/src/main/res/drawable-xxhdpi/ic_archive_white_24dp.png b/src/main/res/drawable-xxhdpi/ic_archive_white_24dp.png Binary files differnew file mode 100644 index 000000000..d526d6a1d --- /dev/null +++ b/src/main/res/drawable-xxhdpi/ic_archive_white_24dp.png diff --git a/src/main/res/drawable-xxhdpi/ic_unarchive_white_24dp.png b/src/main/res/drawable-xxhdpi/ic_unarchive_white_24dp.png Binary files differnew file mode 100644 index 000000000..1a426fb0b --- /dev/null +++ b/src/main/res/drawable-xxhdpi/ic_unarchive_white_24dp.png diff --git a/src/main/res/drawable-xxxhdpi/ic_archive_white_24dp.png b/src/main/res/drawable-xxxhdpi/ic_archive_white_24dp.png Binary files differnew file mode 100644 index 000000000..62d27e00f --- /dev/null +++ b/src/main/res/drawable-xxxhdpi/ic_archive_white_24dp.png diff --git a/src/main/res/drawable-xxxhdpi/ic_unarchive_white_24dp.png b/src/main/res/drawable-xxxhdpi/ic_unarchive_white_24dp.png Binary files differnew file mode 100644 index 000000000..067e413b7 --- /dev/null +++ b/src/main/res/drawable-xxxhdpi/ic_unarchive_white_24dp.png diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml index eaacbde5e..d6831ac26 100644 --- a/src/main/res/layout/account_row.xml +++ b/src/main/res/layout/account_row.xml @@ -1,60 +1,57 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="?android:attr/activatedBackgroundIndicator" - android:paddingStart="8dp" - android:paddingLeft="8dp" - android:paddingTop="8dp" - android:paddingBottom="8dp"> +<layout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> - <com.makeramen.roundedimageview.RoundedImageView - android:id="@+id/account_image" - android:layout_width="48dp" - android:layout_height="48dp" - android:layout_alignParentStart="true" - android:layout_alignParentLeft="true" - android:contentDescription="@string/account_image_description" - android:padding="1dp" - app:riv_corner_radius="@dimen/rounded_image_border" /> - - <LinearLayout - android:layout_width="fill_parent" + <RelativeLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_toStartOf="@+id/tgl_account_status" - android:layout_toLeftOf="@+id/tgl_account_status" - android:layout_toEndOf="@+id/account_image" - android:layout_toRightOf="@+id/account_image" - android:orientation="vertical" - android:paddingStart="@dimen/avatar_item_distance" - android:paddingLeft="@dimen/avatar_item_distance"> + android:background="?android:selectableItemBackground" + android:paddingLeft="8dp" + android:paddingTop="8dp" + android:paddingBottom="8dp"> - <TextView - android:id="@+id/account_jid" - android:layout_width="wrap_content" + <com.makeramen.roundedimageview.RoundedImageView + android:id="@+id/account_image" + android:layout_width="48dp" + android:layout_height="48dp" + android:layout_alignParentLeft="true" + android:contentDescription="@string/account_image_description" + app:riv_corner_radius="2dp" /> + + <LinearLayout + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:scrollHorizontally="false" - android:singleLine="true" - android:textAppearance="@style/TextAppearance.Conversations.Subhead" /> + android:layout_centerVertical="true" + android:layout_toStartOf="@+id/tgl_account_status" + android:layout_toLeftOf="@+id/tgl_account_status" + android:layout_toRightOf="@+id/account_image" + android:orientation="vertical" + android:paddingLeft="@dimen/avatar_item_distance"> + + <TextView + android:id="@+id/account_jid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scrollHorizontally="false" + android:singleLine="true" + android:textAppearance="@style/TextAppearance.Conversations.Subhead" /> - <TextView - android:id="@+id/account_status" + <TextView + android:id="@+id/account_status" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/account_status_unknown" + android:textAppearance="@style/TextAppearance.Conversations.Body2" /> + </LinearLayout> + + <android.support.v7.widget.SwitchCompat + android:id="@+id/tgl_account_status" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/account_status_unknown" - android:textAppearance="@style/TextAppearance.Conversations.Body2" /> - </LinearLayout> - - <android.support.v7.widget.SwitchCompat - android:id="@+id/tgl_account_status" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:focusable="false" - android:padding="16dp" /> + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:focusable="false" + android:padding="16dp" /> -</RelativeLayout>
\ No newline at end of file + </RelativeLayout> +</layout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_import_backup.xml b/src/main/res/layout/activity_import_backup.xml new file mode 100644 index 000000000..bc5ccecc1 --- /dev/null +++ b/src/main/res/layout/activity_import_backup.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<layout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="?attr/color_background_primary" + android:orientation="vertical"> + + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + + <android.support.design.widget.CoordinatorLayout + android:id="@+id/coordinator" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/color_background_primary"> + + <android.support.v7.widget.RecyclerView + android:id="@+id/list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/color_background_primary" + android:orientation="vertical" + app:layoutManager="android.support.v7.widget.LinearLayoutManager" /> + </android.support.design.widget.CoordinatorLayout> + + </LinearLayout> +</layout>
\ No newline at end of file diff --git a/src/main/res/layout/dialog_enter_password.xml b/src/main/res/layout/dialog_enter_password.xml new file mode 100644 index 000000000..935ebad6c --- /dev/null +++ b/src/main/res/layout/dialog_enter_password.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<layout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="?dialogPreferredPadding"> + + <TextView + android:id="@+id/explain" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/enter_password_to_restore" + android:textAppearance="@style/TextAppearance.Conversations.Body2" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="?TextSizeBody1" + android:text="@string/restore_warning" + android:textAppearance="@style/TextAppearance.Conversations.Body1" /> + + <android.support.design.widget.TextInputLayout + android:id="@+id/account_password_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + app:errorTextAppearance="@style/TextAppearance.Conversations.Design.Error" + app:hintTextAppearance="@style/TextAppearance.Conversations.Design.Hint" + app:passwordToggleDrawable="@drawable/visibility_toggle_drawable" + app:passwordToggleEnabled="true" + app:passwordToggleTint="?android:textColorSecondary"> + + <de.pixart.messenger.ui.widget.TextInputEditText + android:id="@+id/account_password" + style="@style/Widget.Conversations.EditText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/password" + android:inputType="textPassword" + android:textColor="?attr/edit_text_color" /> + + </android.support.design.widget.TextInputLayout> + </LinearLayout> +</layout>
\ No newline at end of file diff --git a/src/main/res/layout/dialog_quickedit.xml b/src/main/res/layout/dialog_quickedit.xml index 4ce88b2ba..b309bc173 100644 --- a/src/main/res/layout/dialog_quickedit.xml +++ b/src/main/res/layout/dialog_quickedit.xml @@ -6,11 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:paddingStart="?attr/dialog_horizontal_padding" - android:paddingLeft="?attr/dialog_horizontal_padding" - android:paddingTop="?attr/dialog_vertical_padding" - android:paddingEnd="?attr/dialog_horizontal_padding" - android:paddingRight="?attr/dialog_horizontal_padding"> + android:padding="?dialogPreferredPadding"> <android.support.design.widget.TextInputLayout android:id="@+id/input_layout" diff --git a/src/main/res/menu/editaccount.xml b/src/main/res/menu/editaccount.xml index 09919b9fe..59667c1c7 100644 --- a/src/main/res/menu/editaccount.xml +++ b/src/main/res/menu/editaccount.xml @@ -26,6 +26,11 @@ </item> <item + android:id="@+id/action_import_backup" + android:title="@string/restore_backup" + app:showAsAction="never" /> + + <item android:id="@+id/action_show_qr_code" android:icon="@drawable/ic_qrcode_white_24dp" android:title="@string/show_qr_code" diff --git a/src/main/res/menu/manageaccounts.xml b/src/main/res/menu/manageaccounts.xml index 044c715c5..3199fc2be 100644 --- a/src/main/res/menu/manageaccounts.xml +++ b/src/main/res/menu/manageaccounts.xml @@ -5,18 +5,22 @@ <item android:id="@+id/action_add_account" android:icon="?attr/icon_add_person" - app:showAsAction="always" - android:title="@string/action_add_account" /> + android:title="@string/action_add_account" + app:showAsAction="always" /> + <item + android:id="@+id/action_import_backup" + android:title="@string/restore_backup" + app:showAsAction="never" /> <item android:id="@+id/action_add_account_with_cert" - app:showAsAction="never" android:icon="?attr/icon_add_person" android:title="@string/action_add_account_with_certificate" - android:visible="true" /> + android:visible="true" + app:showAsAction="never" /> <item android:id="@+id/action_settings" android:orderInCategory="100" - app:showAsAction="never" - android:title="@string/action_settings" /> + android:title="@string/action_settings" + app:showAsAction="never" /> </menu>
\ No newline at end of file diff --git a/src/main/res/values/attrs.xml b/src/main/res/values/attrs.xml index e3f355814..ecf8eccd1 100644 --- a/src/main/res/values/attrs.xml +++ b/src/main/res/values/attrs.xml @@ -78,7 +78,6 @@ <attr name="icon_settings" format="reference" /> <attr name="icon_share" format="reference" /> <attr name="icon_delete" format="reference" /> - <attr name="icon_import_export" format="reference" /> <attr name="icon_scan_qr_code" format="reference" /> <attr name="icon_enable_undecided_device" format="reference" /> <attr name="icon_scroll_down" format="reference" /> diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 8867502a4..b0912e1c9 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -314,9 +314,12 @@ <string name="smp_requested">Contact requested SMP verification</string> <string name="no_otr_session_found">No valid OTR session has been found!</string> <string name="conversations_foreground_service" translatable="false">Pix-Art Messenger</string> - <string name="pref_export_logs">Export history</string> - <string name="pref_export_logs_summary">Write conversations history logs to SD card</string> - <string name="notification_export_logs_title">Writing conversations to SD card</string> + <string name="pref_create_backup">Create backup</string> + <string name="pref_create_backup_summary">Write backup files to %s</string> + <string name="notification_create_backup_title">Creating backup files</string> + <string name="notification_restore_backup_title">Restoring backup</string> + <string name="notification_restored_backup_title">Your backup has been restored</string> + <string name="notification_restored_backup_subtitle">Do not forget to enable the account.</string> <string name="choose_file">Choose file</string> <string name="receiving_x_file">Receiving %1$s (%2$d%% completed)</string> <string name="download_x_file">Download %s</string> @@ -575,9 +578,7 @@ <string name="import_canceled">Import canceled</string> <string name="Import_failed">Database import failed, an import is not possible</string> <string name="Password_wrong">Wrong password, try again</string> - <string name="enter_account_password">Please enter your account password to import your backup.</string> <string name="please_wait">Please wait…</string> - <string name="databaseimport_started">Backup will be imported, this may take awhile.</string> <string name="pref_export_plain_text_logs_summary">Enable an export of chat logs as human readable text files</string> <string name="pref_export_plain_text_logs">Export human readable chat logs</string> <string name="payment_required">Payment required</string> @@ -823,7 +824,7 @@ <string name="pref_more_notification_settings">Notification Settings</string> <string name="pref_more_notification_settings_summary">Importance, Sound, Vibrate</string> <string name="video_compression_channel_name">Video compression</string> - <string name="backup_channel_name">Database backup</string> + <string name="backup_channel_name"><![CDATA[Backup & Restore]]></string> <string name="app_update_channel_name">App update</string> <string name="action_group_details">Group details</string> <string name="view_media">View media</string> @@ -862,4 +863,10 @@ <string name="open_with">Open with…</string> <string name="choose_account">Choose account</string> <string name="set_profile_picture">Pix-Art Messenger profile picture</string> + <string name="restore_backup">Restore backup</string> + <string name="restore">Restore</string> + <string name="enter_password_to_restore">Enter your password for the account %s to restore the backup.</string> + <string name="restore_warning">Do not use the restore backup feature in an attempt to clone (run simultaneously) an installation. Restoring a backup is only meant for migrations or in case you have lost the original device.</string> + <string name="unable_to_restore_backup">Unable to restore backup</string> + <string name="unable_to_decrypt_backup">Unable to decrypt backup</string> </resources> diff --git a/src/main/res/values/themes.xml b/src/main/res/values/themes.xml index 92e7cd49c..8060687ac 100644 --- a/src/main/res/values/themes.xml +++ b/src/main/res/values/themes.xml @@ -99,8 +99,6 @@ <item name="icon_search" type="reference">@drawable/ic_search_white_24dp</item> <item name="icon_secure" type="reference">@drawable/ic_lock_open_white_24dp</item> <item name="icon_settings" type="reference">@drawable/ic_settings_black_24dp</item> - <item name="icon_import_export" type="reference">@drawable/ic_import_export_white_24dp - </item> <item name="icon_delete" type="reference">@drawable/ic_delete_black_24dp</item> <item name="icon_share" type="reference">@drawable/ic_share_black_24dp</item> <item name="icon_scan_qr_code" type="reference">@drawable/ic_qrcode_scan_white_24dp</item> @@ -274,8 +272,6 @@ <item name="icon_search" type="reference">@drawable/ic_search_white_24dp</item> <item name="icon_secure" type="reference">@drawable/ic_lock_open_white_24dp</item> <item name="icon_settings" type="reference">@drawable/ic_settings_white_24dp</item> - <item name="icon_import_export" type="reference">@drawable/ic_import_export_white_24dp - </item> <item name="icon_delete" type="reference">@drawable/ic_delete_white_24dp</item> <item name="icon_share" type="reference">@drawable/ic_share_white_24dp</item> <item name="icon_scan_qr_code" type="reference">@drawable/ic_qrcode_scan_white_24dp</item> diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml index 747338435..0244da459 100644 --- a/src/main/res/xml/preferences.xml +++ b/src/main/res/xml/preferences.xml @@ -307,11 +307,11 @@ android:key="crashreport" android:summary="@string/pref_send_crash_summary" android:title="@string/pref_send_crash" /> - <PreferenceCategory android:title="@string/pref_export_logs"> + <PreferenceCategory android:title="@string/pref_create_backup"> <Preference - android:key="export_logs" - android:summary="@string/pref_export_logs_summary" - android:title="@string/pref_export_logs" /> + android:key="create_backup" + android:summary="@string/pref_create_backup_summary" + android:title="@string/pref_create_backup" /> <CheckBoxPreference android:defaultValue="@bool/plain_text_logs" android:key="export_plain_text_logs" |