Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Defining custom color causes NullReferenceException in list adapter

$
0
0

I have a simple app that shows a listview using a custom adapter. When an item is selected it pops up a dialog where information can be added or edited before being saved. Everything works fine. I would like to use a custom color to be used as the background for the dialog when it pops up. However, simply defining the color (even #FFFFFF) within a resource file - and never using it as a resource - causes a NullReferenceException at the instantiation of the adapter (System.NullReferenceException: Object reference not set to an instance of an object). The color is only defined, never used or referenced in any way. If I remove the color definition everything works correctly again.

I am at a complete loss. Any help would be greatly appreciated.

Regards, S


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>