add button to hide autofill info text in Group activity, closes #311
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -158,3 +158,5 @@ src/java/KP2ASoftkeyboard_AS/build/generated/mockable-android-23.jar
|
|||||||
*.rawproto
|
*.rawproto
|
||||||
src/java/Keepass2AndroidPluginSDK2/build/generated/mockable-Google-Inc.-Google-APIs-23.jar
|
src/java/Keepass2AndroidPluginSDK2/build/generated/mockable-Google-Inc.-Google-APIs-23.jar
|
||||||
/src/.vs
|
/src/.vs
|
||||||
|
/src/JavaFileStorageBindings/Jars/JavaFileStorage-release.aar
|
||||||
|
/src/PluginSdkBinding/Jars/app-debug.aar
|
||||||
|
|||||||
@@ -339,6 +339,17 @@ namespace keepass2android
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_prefs.Edit().PutBoolean(autofillservicewasenabled_prefskey, false).Commit();
|
||||||
|
|
||||||
|
if (FindViewById(Resource.Id.info_dont_show_autofill_again) != null)
|
||||||
|
{
|
||||||
|
FindViewById(Resource.Id.info_dont_show_autofill_again).Click += (sender, args) =>
|
||||||
|
{
|
||||||
|
_prefs.Edit().PutBoolean(autofillservicewasenabled_prefskey, true).Commit();
|
||||||
|
UpdateAutofillInfo();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (FindViewById(Resource.Id.fabCancelAddNew) != null)
|
if (FindViewById(Resource.Id.fabCancelAddNew) != null)
|
||||||
{
|
{
|
||||||
FindViewById(Resource.Id.fabAddNew).Click += (sender, args) =>
|
FindViewById(Resource.Id.fabAddNew).Click += (sender, args) =>
|
||||||
@@ -545,6 +556,8 @@ namespace keepass2android
|
|||||||
return _prefs.GetBoolean("InfoTextDisabled_" + infoTextKey, false);
|
return _prefs.GetBoolean("InfoTextDisabled_" + infoTextKey, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const string autofillservicewasenabled_prefskey = "AutofillServiceWasEnabled";
|
||||||
|
|
||||||
private void UpdateAutofillInfo()
|
private void UpdateAutofillInfo()
|
||||||
{
|
{
|
||||||
bool canShowAutofillInfo = false;
|
bool canShowAutofillInfo = false;
|
||||||
@@ -553,16 +566,15 @@ namespace keepass2android
|
|||||||
!((AutofillManager)GetSystemService(Java.Lang.Class.FromType(typeof(AutofillManager))))
|
!((AutofillManager)GetSystemService(Java.Lang.Class.FromType(typeof(AutofillManager))))
|
||||||
.IsAutofillSupported))
|
.IsAutofillSupported))
|
||||||
{
|
{
|
||||||
const string autofillservicewasenabled = "AutofillServiceWasEnabled";
|
|
||||||
if (!((AutofillManager)GetSystemService(Java.Lang.Class.FromType(typeof(AutofillManager))))
|
if (!((AutofillManager)GetSystemService(Java.Lang.Class.FromType(typeof(AutofillManager))))
|
||||||
.HasEnabledAutofillServices)
|
.HasEnabledAutofillServices)
|
||||||
{
|
{
|
||||||
if (!_prefs.GetBoolean(autofillservicewasenabled, false))
|
if (!_prefs.GetBoolean(autofillservicewasenabled_prefskey, false))
|
||||||
canShowAutofillInfo = true;
|
canShowAutofillInfo = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_prefs.Edit().PutBoolean(autofillservicewasenabled, true).Commit();
|
_prefs.Edit().PutBoolean(autofillservicewasenabled_prefskey, true).Commit();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,14 @@
|
|||||||
android:text="@string/show_autofill_help"
|
android:text="@string/show_autofill_help"
|
||||||
style="@style/BottomBarButton" />
|
style="@style/BottomBarButton" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/info_dont_show_autofill_again"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:text="@string/dont_show_again"
|
||||||
|
style="@style/BottomBarButton" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/notification_info_android8_infotext"
|
android:id="@+id/notification_info_android8_infotext"
|
||||||
|
|||||||
Reference in New Issue
Block a user