PickerWithIcon icon indicating copy to clipboard operation
PickerWithIcon copied to clipboard

Crash in Android exception android.content.res.Resources$NotFoundException

Open quantumarun opened this issue 7 years ago • 3 comments

Hi While integrating this in my Project iOS works fine but Android crash on Line 45 of CustomPickerRenderer.cs with exception android.content.res.Resources$NotFoundException.

Resource name is correct and is kept in the drawable folder but still it crashes there.

When i try to use var drawable = Resources.GetDrawable(imagePath); then app doesn't crash but icon does not appear on the view.

Resource BuildAction is AndroidResource.

Can you give a hint what could be issue?

quantumarun avatar Jun 12 '18 11:06 quantumarun

When i renamed the icon name to all small letters, app don't crashes now but icon is not visible on the View/App

quantumarun avatar Jun 12 '18 12:06 quantumarun

Dear Charlin's,

Thanks for providing Xamarin Dropdown picker with icon. I have consumed your code in my development project, but i need some more help from your side.So i hereby request you please suggest the solution of below issue. Issue ;- Custom picker not responding and seems like it is disable.after tap on custom picker and its showing pop window then click on form blank area. Steps In Issue.

  1. I have Created Xamarin Form .Net Standard Project.
  2. I have create registration form on it.
  3. In Form i have used your Custom Picker as field for State.
  4. While click on drop down control its POPUP will opened,After that click on form blank area its pop hide automatically which is fine. but for second time when we are clicking on picker its not show tapped event.its seems like it is disable.

With Regards, Manjeet Malik

manjeetmalik10 avatar Apr 03 '19 17:04 manjeetmalik10

Just pass the drawable directly:

var drawable = ContextCompat.GetDrawable(this.Context, Resource.Drawable.arrow_drop_down_white);

LeoJHarris avatar Jun 06 '19 00:06 LeoJHarris