Skip to content

Conversation

cabauman
Copy link
Contributor

What kind of change does this PR introduce?

Fixes #2061

What is the current behavior?

Not wiring up controls that are camel cased in the axml, but are upper cased in the class. If the axml is changed to match the class, it wires up.

What is the new behavior?

Wiring up controls won't depend on property case.

What might this PR break?
Anyone calling the View overload of GetControl because the signature changed.
Anyone calling the Fragment overload of GetControl because it was removed.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

cabauman added 7 commits June 16, 2019 15:11
- Reintroduce the controlIds dictionary to allow for case-insensitive resource IDs.
- Map assesmbly to dictionary of resource IDs and load the assembly lazily, as needed.
- Replace generic GetControl extensions with non-generic versions (gets rid of multiple casts).
- Get rid of the reflection method members.
- Add conditional for support fragment via the RXUI_ANDROID_SUPPORT constant.
- Lazily determine assembly of the type making the call to WireUpControls.
- Use a ConcurrentDictionary to map assembly to the controlIds dictionary.
- Get rid of unneeded GetControl Fragment overload.
Only the support fragment overload is needed because we're sharing the base code.
@cabauman cabauman requested review from a team, clintonrocksmith and glennawatson June 18, 2019 12:17
private static readonly ConditionalWeakTable<object, Dictionary<string, View>> viewCache =
new ConditionalWeakTable<object, Dictionary<string, View>>();

static ControlFetcherMixin()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the empty constructor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I can remove it.

@glennawatson glennawatson merged commit 59da6e6 into reactiveui:master Jun 18, 2019
madmonkey pushed a commit to madmonkey/ReactiveUI that referenced this pull request Jul 12, 2019
@lock lock bot locked and limited conversation to collaborators Sep 16, 2019
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.

Controls not Wiring Up in Android

2 participants