Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Prevent double time/date picker dialogs on Android when setting focus (
Browse files Browse the repository at this point in the history
  • Loading branch information
hartez authored and rmarinho committed Sep 26, 2018
1 parent e3e4c7c commit 1c36e35
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ void DeviceInfoPropertyChanged(object sender, PropertyChangedEventArgs e)

void OnTextFieldClicked()
{
if (_dialog != null && _dialog.IsShowing)
{
return;
}

DatePicker view = Element;
((IElementController)view).SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ protected virtual TimePickerDialog CreateTimePickerDialog(int hours, int minutes

void OnClick()
{
if (_dialog != null && _dialog.IsShowing)
{
return;
}

TimePicker view = Element;
ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, true);

Expand Down

0 comments on commit 1c36e35

Please sign in to comment.