diff --git a/CHANGELOG b/CHANGELOG index 771a8f908..5965f824a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ KeepassDX (2.5.0.0beta12) * New icons for the material pack / vectorization * New adaptive launcher icon * Added a setting to disable the open button when no password is identified + * Added a setting to disable the education screens KeepassDX (2.5.0.0beta11) * Fix crash in beta10 version diff --git a/app/src/main/java/com/kunzisoft/keepass/activities/EntryActivity.java b/app/src/main/java/com/kunzisoft/keepass/activities/EntryActivity.java index 1498f4561..e49fb8806 100644 --- a/app/src/main/java/com/kunzisoft/keepass/activities/EntryActivity.java +++ b/app/src/main/java/com/kunzisoft/keepass/activities/EntryActivity.java @@ -217,68 +217,70 @@ public class EntryActivity extends LockingHideActivity { * Displays the explanation for copying a field and editing an entry */ private void checkAndPerformedEducation(Menu menu) { + if (PreferencesUtil.isEducationScreensEnabled(this)) { - if (entryContentsView != null && entryContentsView.isUserNamePresent() - && !PreferencesUtil.isEducationCopyUsernamePerformed(this)) { - TapTargetView.showFor(this, - TapTarget.forView(findViewById(R.id.entry_user_name_action_image), - getString(R.string.education_field_copy_title), - getString(R.string.education_field_copy_summary)) - .textColorInt(Color.WHITE) - .tintTarget(false) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - clipboardHelper.timeoutCopyToClipboard(mEntry.getUsername(), - getString(R.string.copy_field, getString(R.string.entry_user_name))); - } - - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - // Launch autofill settings - startActivity(new Intent(EntryActivity.this, SettingsAutofillActivity.class)); - } - }); - PreferencesUtil.saveEducationPreference(this, - R.string.education_copy_username_key); - - } else if (!PreferencesUtil.isEducationEntryEditPerformed(this)) { - - try { + if (entryContentsView != null && entryContentsView.isUserNamePresent() + && !PreferencesUtil.isEducationCopyUsernamePerformed(this)) { TapTargetView.showFor(this, - TapTarget.forToolbarMenuItem(toolbar, R.id.menu_edit, - getString(R.string.education_entry_edit_title), - getString(R.string.education_entry_edit_summary)) + TapTarget.forView(findViewById(R.id.entry_user_name_action_image), + getString(R.string.education_field_copy_title), + getString(R.string.education_field_copy_summary)) .textColorInt(Color.WHITE) - .tintTarget(true) + .tintTarget(false) .cancelable(true), new TapTargetView.Listener() { @Override public void onTargetClick(TapTargetView view) { super.onTargetClick(view); - MenuItem editItem = menu.findItem(R.id.menu_edit); - onOptionsItemSelected(editItem); + clipboardHelper.timeoutCopyToClipboard(mEntry.getUsername(), + getString(R.string.copy_field, getString(R.string.entry_user_name))); } @Override public void onOuterCircleClick(TapTargetView view) { super.onOuterCircleClick(view); view.dismiss(false); - // Open Keepass doc to create field references - Intent browserIntent = new Intent(Intent.ACTION_VIEW, - Uri.parse(getString(R.string.field_references_url))); - startActivity(browserIntent); + // Launch autofill settings + startActivity(new Intent(EntryActivity.this, SettingsAutofillActivity.class)); } }); PreferencesUtil.saveEducationPreference(this, - R.string.education_entry_edit_key); - } catch (Exception e) { - // If icon not visible - Log.w(TAG, "Can't performed education for entry's edition"); + R.string.education_copy_username_key); + + } else if (!PreferencesUtil.isEducationEntryEditPerformed(this)) { + + try { + TapTargetView.showFor(this, + TapTarget.forToolbarMenuItem(toolbar, R.id.menu_edit, + getString(R.string.education_entry_edit_title), + getString(R.string.education_entry_edit_summary)) + .textColorInt(Color.WHITE) + .tintTarget(true) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + MenuItem editItem = menu.findItem(R.id.menu_edit); + onOptionsItemSelected(editItem); + } + + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + // Open Keepass doc to create field references + Intent browserIntent = new Intent(Intent.ACTION_VIEW, + Uri.parse(getString(R.string.field_references_url))); + startActivity(browserIntent); + } + }); + PreferencesUtil.saveEducationPreference(this, + R.string.education_entry_edit_key); + } catch (Exception e) { + // If icon not visible + Log.w(TAG, "Can't performed education for entry's edition"); + } } } } diff --git a/app/src/main/java/com/kunzisoft/keepass/activities/EntryEditActivity.java b/app/src/main/java/com/kunzisoft/keepass/activities/EntryEditActivity.java index fbeb943a5..768bd34bd 100644 --- a/app/src/main/java/com/kunzisoft/keepass/activities/EntryEditActivity.java +++ b/app/src/main/java/com/kunzisoft/keepass/activities/EntryEditActivity.java @@ -276,59 +276,58 @@ public class EntryEditActivity extends LockingHideActivity * Displays the explanation for the icon selection, the password generator and for a new field */ private void checkAndPerformedEducation() { + if (PreferencesUtil.isEducationScreensEnabled(this)) { + // TODO Show icon - // TODO Show icon + if (!PreferencesUtil.isEducationPasswordGeneratorPerformed(this)) { + TapTargetView.showFor(this, + TapTarget.forView(generatePasswordView, + getString(R.string.education_generate_password_title), + getString(R.string.education_generate_password_summary)) + .textColorInt(Color.WHITE) + .tintTarget(false) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + openPasswordGenerator(); + } - if (!PreferencesUtil.isEducationPasswordGeneratorPerformed(this)) { - TapTargetView.showFor(this, - TapTarget.forView(generatePasswordView, - getString(R.string.education_generate_password_title), - getString(R.string.education_generate_password_summary)) - .textColorInt(Color.WHITE) - .tintTarget(false) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - openPasswordGenerator(); - } - - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - } - }); - PreferencesUtil.saveEducationPreference(this, - R.string.education_password_generator_key); - } - - else if (mEntry.allowExtraFields() + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + } + }); + PreferencesUtil.saveEducationPreference(this, + R.string.education_password_generator_key); + } else if (mEntry.allowExtraFields() && !mEntry.containsCustomFields() && !PreferencesUtil.isEducationEntryNewFieldPerformed(this)) { - TapTargetView.showFor(this, - TapTarget.forView(addNewFieldView, - getString(R.string.education_entry_new_field_title), - getString(R.string.education_entry_new_field_summary)) - .textColorInt(Color.WHITE) - .tintTarget(false) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - addNewCustomField(); - } + TapTargetView.showFor(this, + TapTarget.forView(addNewFieldView, + getString(R.string.education_entry_new_field_title), + getString(R.string.education_entry_new_field_summary)) + .textColorInt(Color.WHITE) + .tintTarget(false) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + addNewCustomField(); + } - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - } - }); - PreferencesUtil.saveEducationPreference(this, - R.string.education_entry_new_field_key); + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + } + }); + PreferencesUtil.saveEducationPreference(this, + R.string.education_entry_new_field_key); + } } } diff --git a/app/src/main/java/com/kunzisoft/keepass/activities/GroupActivity.java b/app/src/main/java/com/kunzisoft/keepass/activities/GroupActivity.java index fffe6ca59..c1fe69db5 100644 --- a/app/src/main/java/com/kunzisoft/keepass/activities/GroupActivity.java +++ b/app/src/main/java/com/kunzisoft/keepass/activities/GroupActivity.java @@ -491,129 +491,131 @@ public class GroupActivity extends ListNodesActivity * Displays the explanation for a add, search, sort a new node and lock the database */ private void checkAndPerformedEducation(Menu menu) { + if (PreferencesUtil.isEducationScreensEnabled(this)) { - // If no node, show education to add new one - if (listNodesFragment != null - && listNodesFragment.isEmpty()) { - if (!PreferencesUtil.isEducationNewNodePerformed(this)) { + // If no node, show education to add new one + if (listNodesFragment != null + && listNodesFragment.isEmpty()) { + if (!PreferencesUtil.isEducationNewNodePerformed(this)) { - TapTargetView.showFor(this, - TapTarget.forView(findViewById(R.id.add_button), - getString(R.string.education_new_node_title), - getString(R.string.education_new_node_summary)) - .textColorInt(Color.WHITE) - .tintTarget(false) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - addNodeButtonView.openButtonIfClose(); - } + TapTargetView.showFor(this, + TapTarget.forView(findViewById(R.id.add_button), + getString(R.string.education_new_node_title), + getString(R.string.education_new_node_summary)) + .textColorInt(Color.WHITE) + .tintTarget(false) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + addNodeButtonView.openButtonIfClose(); + } - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - } - }); - PreferencesUtil.saveEducationPreference(this, - R.string.education_new_node_key); + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + } + }); + PreferencesUtil.saveEducationPreference(this, + R.string.education_new_node_key); + } } - } - // Else show the search education - else if (!PreferencesUtil.isEducationSearchPerformed(this)) { + // Else show the search education + else if (!PreferencesUtil.isEducationSearchPerformed(this)) { - try { - TapTargetView.showFor(this, - TapTarget.forToolbarMenuItem(toolbar, R.id.menu_search, - getString(R.string.education_search_title), - getString(R.string.education_search_summary)) - .textColorInt(Color.WHITE) - .tintTarget(true) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - MenuItem searchItem = menu.findItem(R.id.menu_search); - searchItem.expandActionView(); - } + try { + TapTargetView.showFor(this, + TapTarget.forToolbarMenuItem(toolbar, R.id.menu_search, + getString(R.string.education_search_title), + getString(R.string.education_search_summary)) + .textColorInt(Color.WHITE) + .tintTarget(true) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + MenuItem searchItem = menu.findItem(R.id.menu_search); + searchItem.expandActionView(); + } - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - } - }); - PreferencesUtil.saveEducationPreference(this, - R.string.education_search_key); - } catch (Exception e) { - // If icon not visible - Log.w(TAG, "Can't performed education for search"); + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + } + }); + PreferencesUtil.saveEducationPreference(this, + R.string.education_search_key); + } catch (Exception e) { + // If icon not visible + Log.w(TAG, "Can't performed education for search"); + } } - } - // Else show the sort education - else if (!PreferencesUtil.isEducationSortPerformed(this)) { + // Else show the sort education + else if (!PreferencesUtil.isEducationSortPerformed(this)) { - try { - TapTargetView.showFor(this, - TapTarget.forToolbarMenuItem(toolbar, R.id.menu_sort, - getString(R.string.education_sort_title), - getString(R.string.education_sort_summary)) - .textColorInt(Color.WHITE) - .tintTarget(true) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - MenuItem sortItem = menu.findItem(R.id.menu_sort); - onOptionsItemSelected(sortItem); - } + try { + TapTargetView.showFor(this, + TapTarget.forToolbarMenuItem(toolbar, R.id.menu_sort, + getString(R.string.education_sort_title), + getString(R.string.education_sort_summary)) + .textColorInt(Color.WHITE) + .tintTarget(true) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + MenuItem sortItem = menu.findItem(R.id.menu_sort); + onOptionsItemSelected(sortItem); + } - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - } - }); - PreferencesUtil.saveEducationPreference(this, - R.string.education_sort_key); - } catch (Exception e) { - Log.w(TAG, "Can't performed education for sort"); + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + } + }); + PreferencesUtil.saveEducationPreference(this, + R.string.education_sort_key); + } catch (Exception e) { + Log.w(TAG, "Can't performed education for sort"); + } } - } - // Else show the lock education - else if (!PreferencesUtil.isEducationLockPerformed(this)) { + // Else show the lock education + else if (!PreferencesUtil.isEducationLockPerformed(this)) { - try { - TapTargetView.showFor(this, - TapTarget.forToolbarMenuItem(toolbar, R.id.menu_lock, - getString(R.string.education_lock_title), - getString(R.string.education_lock_summary)) - .textColorInt(Color.WHITE) - .tintTarget(true) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - MenuItem lockItem = menu.findItem(R.id.menu_lock); - onOptionsItemSelected(lockItem); - } + try { + TapTargetView.showFor(this, + TapTarget.forToolbarMenuItem(toolbar, R.id.menu_lock, + getString(R.string.education_lock_title), + getString(R.string.education_lock_summary)) + .textColorInt(Color.WHITE) + .tintTarget(true) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + MenuItem lockItem = menu.findItem(R.id.menu_lock); + onOptionsItemSelected(lockItem); + } - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - } - }); - PreferencesUtil.saveEducationPreference(this, - R.string.education_lock_key); - } catch (Exception e) { - Log.w(TAG, "Can't performed education for lock"); + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + } + }); + PreferencesUtil.saveEducationPreference(this, + R.string.education_lock_key); + } catch (Exception e) { + Log.w(TAG, "Can't performed education for lock"); + } } } } diff --git a/app/src/main/java/com/kunzisoft/keepass/fileselect/FileSelectActivity.java b/app/src/main/java/com/kunzisoft/keepass/fileselect/FileSelectActivity.java index c971a0850..5e187ec04 100644 --- a/app/src/main/java/com/kunzisoft/keepass/fileselect/FileSelectActivity.java +++ b/app/src/main/java/com/kunzisoft/keepass/fileselect/FileSelectActivity.java @@ -355,60 +355,62 @@ public class FileSelectActivity extends StylishActivity implements * Displays the explanation for a database selection */ private void checkAndPerformedEducationForSelection() { + if (PreferencesUtil.isEducationScreensEnabled(this)) { - if (!PreferencesUtil.isEducationSelectDatabasePerformed(this) - && browseButtonView != null) { + if (!PreferencesUtil.isEducationSelectDatabasePerformed(this) + && browseButtonView != null) { - TapTargetView.showFor(FileSelectActivity.this, - TapTarget.forView(browseButtonView, - getString(R.string.education_select_database_title), - getString(R.string.education_select_database_summary)) - .icon(ContextCompat.getDrawable(this, R.drawable.ic_folder_white_24dp)) - .textColorInt(Color.WHITE) - .tintTarget(true) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - keyFileHelper.getOpenFileOnClickViewListener().onClick(view); - } - - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - - if (!PreferencesUtil.isEducationOpenLinkDatabasePerformed(FileSelectActivity.this)) { - - TapTargetView.showFor(FileSelectActivity.this, - TapTarget.forView(fileSelectExpandableButton, - getString(R.string.education_open_link_database_title), - getString(R.string.education_open_link_database_summary)) - .icon(ContextCompat.getDrawable(FileSelectActivity.this, R.drawable.ic_link_white_24dp)) - .textColorInt(Color.WHITE) - .tintTarget(true) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - // Do nothing here - } - - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - } - }); - PreferencesUtil.saveEducationPreference(FileSelectActivity.this, - R.string.education_open_link_db_key); + TapTargetView.showFor(FileSelectActivity.this, + TapTarget.forView(browseButtonView, + getString(R.string.education_select_database_title), + getString(R.string.education_select_database_summary)) + .icon(ContextCompat.getDrawable(this, R.drawable.ic_folder_white_24dp)) + .textColorInt(Color.WHITE) + .tintTarget(true) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + keyFileHelper.getOpenFileOnClickViewListener().onClick(view); } - } - }); - PreferencesUtil.saveEducationPreference(FileSelectActivity.this, - R.string.education_select_db_key); + + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + + if (!PreferencesUtil.isEducationOpenLinkDatabasePerformed(FileSelectActivity.this)) { + + TapTargetView.showFor(FileSelectActivity.this, + TapTarget.forView(fileSelectExpandableButton, + getString(R.string.education_open_link_database_title), + getString(R.string.education_open_link_database_summary)) + .icon(ContextCompat.getDrawable(FileSelectActivity.this, R.drawable.ic_link_white_24dp)) + .textColorInt(Color.WHITE) + .tintTarget(true) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + // Do nothing here + } + + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + } + }); + PreferencesUtil.saveEducationPreference(FileSelectActivity.this, + R.string.education_open_link_db_key); + } + } + }); + PreferencesUtil.saveEducationPreference(FileSelectActivity.this, + R.string.education_select_db_key); + } } } diff --git a/app/src/main/java/com/kunzisoft/keepass/password/PasswordActivity.java b/app/src/main/java/com/kunzisoft/keepass/password/PasswordActivity.java index 4615cd8f4..6be184434 100644 --- a/app/src/main/java/com/kunzisoft/keepass/password/PasswordActivity.java +++ b/app/src/main/java/com/kunzisoft/keepass/password/PasswordActivity.java @@ -385,34 +385,37 @@ public class PasswordActivity extends StylishActivity * Displays the explanation for a database opening with fingerprints if available */ private void checkAndPerformedEducation() { - if (!PreferencesUtil.isEducationUnlockPerformed(this)) { + if (PreferencesUtil.isEducationScreensEnabled(this)) { - TapTargetView.showFor(this, - TapTarget.forView(findViewById(R.id.password_input_container), - getString(R.string.education_unlock_title), - getString(R.string.education_unlock_summary)) - .dimColor(R.color.green) - .icon(ContextCompat.getDrawable(this, R.mipmap.ic_launcher_round)) - .textColorInt(Color.WHITE) - .tintTarget(false) - .cancelable(true), - new TapTargetView.Listener() { - @Override - public void onTargetClick(TapTargetView view) { - super.onTargetClick(view); - checkAndPerformedEducationForFingerprint(); - } + if (!PreferencesUtil.isEducationUnlockPerformed(this)) { - @Override - public void onOuterCircleClick(TapTargetView view) { - super.onOuterCircleClick(view); - view.dismiss(false); - checkAndPerformedEducationForFingerprint(); + TapTargetView.showFor(this, + TapTarget.forView(findViewById(R.id.password_input_container), + getString(R.string.education_unlock_title), + getString(R.string.education_unlock_summary)) + .dimColor(R.color.green) + .icon(ContextCompat.getDrawable(this, R.mipmap.ic_launcher_round)) + .textColorInt(Color.WHITE) + .tintTarget(false) + .cancelable(true), + new TapTargetView.Listener() { + @Override + public void onTargetClick(TapTargetView view) { + super.onTargetClick(view); + checkAndPerformedEducationForFingerprint(); + } - } - }); - // TODO make a period for donation - PreferencesUtil.saveEducationPreference(PasswordActivity.this, R.string.education_unlock_key); + @Override + public void onOuterCircleClick(TapTargetView view) { + super.onOuterCircleClick(view); + view.dismiss(false); + checkAndPerformedEducationForFingerprint(); + + } + }); + // TODO make a period for donation + PreferencesUtil.saveEducationPreference(PasswordActivity.this, R.string.education_unlock_key); + } } } @@ -421,14 +424,18 @@ public class PasswordActivity extends StylishActivity * Displays fingerprints if available */ private void checkAndPerformedEducationForFingerprint() { - if (PreferencesUtil.isFingerprintEnable(getApplicationContext())) { - TapTargetView.showFor(this, - TapTarget.forView(fingerprintImageView, - getString(R.string.education_fingerprint_title), - getString(R.string.education_fingerprint_summary)) - .textColorInt(Color.WHITE) - .tintTarget(false) - .cancelable(true), + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + + if ( PreferencesUtil.isFingerprintEnable(getApplicationContext()) + && FingerPrintHelper.isFingerprintSupported(FingerprintManagerCompat.from(this))) { + + TapTargetView.showFor(this, + TapTarget.forView(fingerprintImageView, + getString(R.string.education_fingerprint_title), + getString(R.string.education_fingerprint_summary)) + .textColorInt(Color.WHITE) + .tintTarget(false) + .cancelable(true), new TapTargetView.Listener() { @Override public void onOuterCircleClick(TapTargetView view) { @@ -436,6 +443,7 @@ public class PasswordActivity extends StylishActivity view.dismiss(false); } }); + } } } diff --git a/app/src/main/java/com/kunzisoft/keepass/settings/PreferencesUtil.java b/app/src/main/java/com/kunzisoft/keepass/settings/PreferencesUtil.java index ee713e0ea..4aa144494 100644 --- a/app/src/main/java/com/kunzisoft/keepass/settings/PreferencesUtil.java +++ b/app/src/main/java/com/kunzisoft/keepass/settings/PreferencesUtil.java @@ -176,6 +176,12 @@ public class PreferencesUtil { R.string.education_entry_new_field_key }; + public static boolean isEducationScreensEnabled(Context context) { + SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); + return sharedPreferences.getBoolean(context.getString(R.string.enable_education_screens_key), + context.getResources().getBoolean(R.bool.enable_education_screens_default)); + } + /** * Register education preferences as true in EDUCATION_PREFERENCE SharedPreferences * diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index acd5d3a97..ed33c9345 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -262,8 +262,10 @@ Magikeyboard Activer un clavier customisé qui permet le renseignement de vos mots de passe et de tous vos champs d\'identité facilement. + Ecrans d\'éducation + Met en surbrillance les éléments pour apprendre le fonctionnement de l\'application Réinitialiser les écrans d\'éducation - Mettre en surbrillance les éléments pour apprendre le fonctionnement de l\'application + Réinitialise l\'affichage des éléments d\'éducation Ecrans d\'éducation réinitialisés Créez votre fichier de base de données Vous ne connaissez pas encore KeePass DX, créez votre premier fichier de gestion de mots de passe. diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml index 0c9b68340..a0c834538 100644 --- a/app/src/main/res/values/donottranslate.xml +++ b/app/src/main/res/values/donottranslate.xml @@ -81,6 +81,8 @@ database_name_key database_description_key database_version_key + + enable_education_screens_key relaunch_education_screens_key education_create_db_key education_select_db_key @@ -95,6 +97,7 @@ education_password_generator_key education_entry_new_field_key education_screen_reclicked_key + settings_appearance_key magic_keyboard_key magic_keyboard_preference_key @@ -116,6 +119,7 @@ true true true + true false false false diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8d39da67f..9472ec115 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -281,8 +281,10 @@ Allow no password Enable the open button if no password identification is selected. + Education screens + Highlight the elements to learn how the application works Reset education screens - Highlight the elements to learn how the application works + Reset the display of education items Education screens reseted Create your database file You don\'t know KeePass DX yet, create your first password management file. diff --git a/app/src/main/res/xml/appearance_preferences.xml b/app/src/main/res/xml/appearance_preferences.xml index ef7be9f7b..66f6cbaf9 100644 --- a/app/src/main/res/xml/appearance_preferences.xml +++ b/app/src/main/res/xml/appearance_preferences.xml @@ -63,6 +63,11 @@ +