New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the Id field for Android Views created by Forms #1004

Merged
merged 6 commits into from Jun 22, 2017

Conversation

Projects
None yet
5 participants
@hartez
Member

hartez commented Jun 21, 2017

Description of Change

Because Forms doesn't set the Id value for Android Views it creates, some methods (most notably BackStackRecord.configureTransitions) which search for Views by Id and cast them were failing because all of the Views had the default of NO_ID (-1).

This change sets the Id field for the various renderers and for the ModalContainer to prevent this issue.

Bugs Fixed

API Changes

None

Behavioral Changes

None

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

hartez added some commits Jun 21, 2017

@samhouts

Fixes the issue! Lovely!!

Show outdated Hide outdated Xamarin.Forms.Controls/TestCases.cs
select MakeIssueCell (issueModel.Name, issueModel.Description, issueModel.Action);
// TODO hartez 2017/06/21 09:12:51 Restore the original order

This comment has been minimized.

@samhouts

samhouts Jun 21, 2017

Member

Don't forget about this guy!

@samhouts

samhouts Jun 21, 2017

Member

Don't forget about this guy!

This comment has been minimized.

@hartez

hartez Jun 21, 2017

Member

Blergh. I did restore the order, then I forgot to remove the comment.

@hartez

hartez Jun 21, 2017

Member

Blergh. I did restore the order, then I forgot to remove the comment.

hartez added some commits Jun 21, 2017

@rmarinho rmarinho merged commit 075a6b3 into master Jun 22, 2017

4 of 5 checks passed

Android-UITests-Stable-LegacyRenderers Started TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 (Legacy Render…
Details
Android-UITests-Stable Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 : Tests passe…
Details
OSX-Debug-Stable Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: OSX Debug : Running
Details
Windows-Debug-Stable Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: Windows Debug : Tests passed: 3801, ignored: 10
Details
Windows-Release-Stable Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: Windows Release Unit Tests : Tests passed: 3801, ignored: 10
Details

rmarinho added a commit that referenced this pull request Jun 22, 2017

@rmarinho rmarinho deleted the maps-modal-crashes branch Jun 26, 2017

assemhakmeh added a commit to assemhakmeh/Xamarin.Forms that referenced this pull request Jul 28, 2017

Merge branch '2.3.5' into ios-fastrenderers
* 2.3.5:
  [UWP] Fixes for usage of XF with .net native toolchain (#1024)
  [UWP] Make sure to update HitTestVisible when IsEnable changes (#1015)
  [Android] Dispose check before setting properties on Button (#1013)
  Add missing member variable to FormsApplicationActivity
  Fix NRE when background color of button set in FormsApplicationActivity (#1010)
  Fix border on android buttons  (#941)
  [iOS] ListView with UnevenRows and Cell Heights will no longer be slow to load (#994)
  Set the Id field for Android Views created by Forms #1004
  Fix build
  Fix possible crash on API 21+ at launch when using Holo theme and FormsApplicationActivity (#961)
  [Android] Remove the ". " on empty labels (Accessibility) on Fastrenderers (#915)
  Remove debug outputs (#1008)
  Add check for instance of UITableView (#885)
  [XamlC] fix release builds of Xaml Unit Tests
  Dispose check on ButtonRenderer (#975)
  [previewer] make sure we do not crash even if the previewer doesn't s… (#946)
  [XamlC] fix build
  Remove VisualElement finalizer (#918)
  [XamlC] process symbols if DebugType is set (#925)

@samhouts samhouts added D-15.4 and removed cla-not-required labels Oct 10, 2017

@samhouts samhouts added this to the 2.3.0 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment