xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

Xamarin forms (3.3.0.912540) on Android - Custom PickerRenderer Control.Click stops working on first user's click #4732

Open wilsonvargas opened 5 years ago

wilsonvargas commented 5 years ago

Description

On Android - Custom PickerRenderer Control.Click stops working on first user's click.

After updating nuget packages from Xamarin forms 3.2 to 3.4.0.1008975.

We are using a Custom PickerRenderer -to add a custom dropdown icon and some styling and this works and looks same as before. -to use our own picker modal we have added our Control.Click += Control_Click; event listener which previously opened our custom dialog.

Steps to Reproduce

  1. The first time user taps/clicks on the CustomPicker Xamarin opens the OTB Android Picker dialog (and not our custom renderer like it did before nuget updates). And If the user selects/closes the OTB dialog and taps/clicks the CustomPicker second time; now our Control_Click event is fired and our custom picker dialog is shown.
  2. Also the OTB picker dialog that opens up.. does not open smoothly; the screen flickers while the otb dialog is first rendered on top of the screen and resized/moved to the center of the screen.

Expected Behavior

Open our custom renderer when user tap the Custom Picker

Actual Behavior

The first time user taps/clicks on the CustomPicker Xamarin opens the OTB Android Picker dialog

Basic Information

Screenshots

gif

Reproduction Link

CustomPickerBug.zip

kingces95 commented 5 years ago

We don't typically debug custom renderers. Instead, could you tell us what features we're missing so that we might add them to the first class renderers? In that way everyone can benefit from the work. Short of that, if you're able to debug the issue and submit a PR then we'll review that.