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

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

Merged
merged 6 commits into from Jun 22, 2017

Conversation

hartez
Copy link
Contributor

@hartez 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

Copy link
Member

@samhouts samhouts left a comment

Choose a reason for hiding this comment

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

Fixes the issue! Lovely!!

select MakeIssueCell (issueModel.Name, issueModel.Description, issueModel.Action);

// TODO hartez 2017/06/21 09:12:51 Restore the original order
Copy link
Member

Choose a reason for hiding this comment

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

Don't forget about this guy!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

@rmarinho rmarinho merged commit 075a6b3 into master Jun 22, 2017
@rmarinho rmarinho deleted the maps-modal-crashes branch June 26, 2017 11:18
assemhakmeh added a commit to assemhakmeh/Xamarin.Forms that referenced this pull request Jul 28, 2017
* 2.3.5:
  [UWP] Fixes for usage of XF with .net native toolchain (xamarin#1024)
  [UWP] Make sure to update HitTestVisible when IsEnable changes (xamarin#1015)
  [Android] Dispose check before setting properties on Button (xamarin#1013)
  Add missing member variable to FormsApplicationActivity
  Fix NRE when background color of button set in FormsApplicationActivity (xamarin#1010)
  Fix border on android buttons  (xamarin#941)
  [iOS] ListView with UnevenRows and Cell Heights will no longer be slow to load (xamarin#994)
  Set the Id field for Android Views created by Forms xamarin#1004
  Fix build
  Fix possible crash on API 21+ at launch when using Holo theme and FormsApplicationActivity (xamarin#961)
  [Android] Remove the ". " on empty labels (Accessibility) on Fastrenderers (xamarin#915)
  Remove debug outputs (xamarin#1008)
  Add check for instance of UITableView (xamarin#885)
  [XamlC] fix release builds of Xaml Unit Tests
  Dispose check on ButtonRenderer (xamarin#975)
  [previewer] make sure we do not crash even if the previewer doesn't s… (xamarin#946)
  [XamlC] fix build
  Remove VisualElement finalizer (xamarin#918)
  [XamlC] process symbols if DebugType is set (xamarin#925)
@samhouts samhouts added this to the 2.3.0 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.

None yet

5 participants