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

[Android] DatePicker unfocuses on cancel#204

Merged
rmarinho merged 1 commit intomasterfrom
fix-bugzilla41424
Jun 16, 2016
Merged

[Android] DatePicker unfocuses on cancel#204
rmarinho merged 1 commit intomasterfrom
fix-bugzilla41424

Conversation

@pauldipietro
Copy link
Copy Markdown
Contributor

@pauldipietro pauldipietro commented Jun 2, 2016

Description of Change

When using the DatePicker in Android, closing it via the cancel button would not unfocus the Element, causing a Focus() call via something such as a button to not function as otherwise expected.

Bugs Fixed

https://bugzilla.xamarin.com/show_bug.cgi?id=41424

API Changes

None

Behavioral Changes

None expected

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense


void OnCancelButtonClicked(object sender, EventArgs e)
{
Element.Unfocus();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Unfocus and ClearFocus the same?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClearFocus is on the Android View class and calling Element.Unfocus is keeping track of the fact that it's being dismissed/unfocused away since it apparently wasn't being updated by the cancel button which I suppose is treated differently than clicking Ok/Done or the equivalent.

@rmarinho
Copy link
Copy Markdown
Member

rmarinho commented Jun 8, 2016

Needs rebase

@pauldipietro
Copy link
Copy Markdown
Contributor Author

Done

@rmarinho
Copy link
Copy Markdown
Member

rmarinho commented Jun 9, 2016

👍

1 similar comment
@jassmith
Copy link
Copy Markdown

👍

The DatePicker in Android would remain focused when being closed via the
cancel button, and a subsequent re-focus via something such as button
would not function as expected.
@rmarinho rmarinho force-pushed the fix-bugzilla41424 branch from 5178156 to b86d594 Compare June 16, 2016 17:51
@rmarinho rmarinho merged commit d44396a into master Jun 16, 2016
@rmarinho rmarinho deleted the fix-bugzilla41424 branch June 16, 2016 17:51
@pauldipietro pauldipietro mentioned this pull request Jul 7, 2016
4 tasks
@samhouts samhouts added this to the 2.3.1 milestone Jun 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants