vpapenko / ColorPicker

Color pickers for Xamarin Forms.
MIT License
43 stars 11 forks source link

Control is not displayed in Xamarin Community Toolkit TabView #58

Open VolodaUa opened 2 years ago

VolodaUa commented 2 years ago

Something is wrong when the color picker is child element of TabViewItem(control -> Xamarin Community Toolkit TabView). https://docs.microsoft.com/en-us/xamarin/community-toolkit/views/tabview

The color picker becomes transparent, but the color selection is still available. You can swipe and see the selected color is changing. I attached the sample which shows the issue.

Steps to reproduce the behavior:

  1. Open the sample app(TestApp.Android).
  2. Click on 'Tab 2.'
  3. Click on 'Tab 1.'
  4. See error

Expected behavior The Color picker must be visible and displayed.

Screenshots Screenshot 2021-11-30 at 18 24 12

Sample Project ColorPicker-master.zip

Information

VolodaUa commented 2 years ago

The workaround was found. I found that the control uses SKGLView for drawing on Android. Replacing to SKCanvasView helped to fix the issue. iOS uses it and it works well. The same I can tell about Android. Performance issues weren't found.

@vpapenko Could you please tell me did you had some specific reason to use SKGLView on Android? I found that there is a difference in rendering - SKCanvasView - CPU, SKGLView - GPU.

vpapenko commented 2 years ago

Hi @VolodaUa Thank you for your investigation. I started to use different SK Views because of optimization for the UWP platform. Give me some time to check these changes and test your solution.