[Android] Fix for NullReferenceException when using the wrong activit… #286

Merged
merged 2 commits into from Aug 17, 2016

Conversation

Projects
None yet
5 participants
@oddbear
Contributor

oddbear commented Aug 8, 2016

Description of Change

Better exception message than NullReferenceException in KeyboardManager if using the wrong Activity on a Android SplashScreen.

Bugs Fixed

https://bugzilla.xamarin.com/show_bug.cgi?id=32733
According to StackTrace in bugzilla:
"at Xamarin.Forms.Platform.Android.FormsApplicationActivity.OnPause () <IL 0x00007, 0x0004b>"

API Changes

None

Behavioral Changes

Just an extra "if nullcheck" when calling HideKeyboard and ShowKeyboard on KeyboardManager. No other.

[Android] Fix for NullReferenceException when using the wrong activit…
…y type.

On using FormsApplicationActivity or FormsAppCompatActivity as base Activity in a SplashScreen.
A NullReferenceException will be thrown in the KeyboardManager.
Added InvalidOperationException with "Forms.Init()" message instead, if the Forms.Context is null.
@dnfclas

This comment has been minimized.

Show comment
Hide comment
@dnfclas

dnfclas Aug 8, 2016

Hi @oddbear, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

dnfclas commented Aug 8, 2016

Hi @oddbear, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

@rmarinho

This comment has been minimized.

Show comment
Hide comment
@rmarinho

rmarinho Aug 10, 2016

Member

👍

Member

rmarinho commented Aug 10, 2016

👍

@jassmith

This comment has been minimized.

Show comment
Hide comment
@jassmith

jassmith Aug 16, 2016

Member

Fix indentation then 👍

Member

jassmith commented Aug 16, 2016

Fix indentation then 👍

@oddbear

This comment has been minimized.

Show comment
Hide comment
@oddbear

oddbear Aug 17, 2016

Contributor

Thanks @jassmith, should be fixed now. 👍

Contributor

oddbear commented Aug 17, 2016

Thanks @jassmith, should be fixed now. 👍

@rmarinho rmarinho merged commit cb2bcdb into xamarin:master Aug 17, 2016

stefandevo added a commit to stefandevo/Xamarin.Forms that referenced this pull request Aug 31, 2016

Merge branch 'master' of https://github.com/xamarin/Xamarin.Forms
* 'master' of https://github.com/xamarin/Xamarin.Forms: (69 commits)
  Fix docs
  [Win] Fix FontAttributes unexpectedly changing a label's size (#325)
  [A] Check UserVisibleHint to prevent non-active tabs from firing SendAppearing in OnResume (#328)
  KeyboardExtensions is now public (#326)
  [A] PanGestureRecognizer will consistently send Completed event (#313)
  Use character truncation in Windows (#321)
  Fix for ListView BindingContext for Header/Footer (#312)
  Fix memory leak caused by BaseCellView and RendererHolder (#311)
  Update Makefile to support linux env (#309)
  Platform Specifics (#301)
  Throw InvalidOperationException if AppLinkEntry.Thumbnail source is invalid (#299)
  Allow Custom Android MapRenderers to override the default MapView options (#285)
  Fix crash when ItemsSource is set to null (#320)
  Fixed SinInOut description. (#319)
  Fix regression by adding null check in Windows ListView selection (#314)
  [Android] Fix for NullReferenceException when using the wrong activit… (#286)
  [WinRT] Remove preemptive setting of null upon action sheet closure (#305)
  [Xaml] Clone node tree on DT, allow markup to be evaluated multiple times (#295)
  [Windows] Correct enter/esc keypress behaviors for MessageDialog (#292)
  [iOS] Change when we updated the XF INavigationPageController after popping a page natively, Cleanup UITest references (#291)
  ...

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

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