mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-23 11:45:38 +01:00
autofocus prompt input
This commit is contained in:
parent
2376489f51
commit
31a77a6e19
@ -229,7 +229,7 @@ namespace Bit.Droid.Services
|
||||
|
||||
public Task<string> DisplayPromptAync(string title = null, string description = null,
|
||||
string text = null, string okButtonText = null, string cancelButtonText = null,
|
||||
bool numericKeyboard = false)
|
||||
bool numericKeyboard = false, bool autofocus = true)
|
||||
{
|
||||
var activity = (MainActivity)CrossCurrentActivity.Current.Activity;
|
||||
if(activity == null)
|
||||
@ -278,6 +278,10 @@ namespace Bit.Droid.Services
|
||||
var alert = alertBuilder.Create();
|
||||
alert.Window.SetSoftInputMode(Android.Views.SoftInput.StateVisible);
|
||||
alert.Show();
|
||||
if(autofocus)
|
||||
{
|
||||
input.RequestFocus();
|
||||
}
|
||||
return result.Task;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,8 @@ namespace Bit.App.Abstractions
|
||||
Task ClearCacheAsync();
|
||||
Task SelectFileAsync();
|
||||
Task<string> DisplayPromptAync(string title = null, string description = null, string text = null,
|
||||
string okButtonText = null, string cancelButtonText = null, bool numericKeyboard = false);
|
||||
string okButtonText = null, string cancelButtonText = null, bool numericKeyboard = false,
|
||||
bool autofocus = true);
|
||||
void RateApp();
|
||||
bool SupportsFaceId();
|
||||
bool SupportsNfc();
|
||||
|
Loading…
Reference in New Issue
Block a user