http://stackoverflow.com/questions/10852711/getdrawable-returning-null http://stackoverflow.com/questions/8859888/strange-exception-about-resource-not-found
On Tue, Jul 23, 2013 at 10:11 AM, Samus Arin <samusa...@gmail.com> wrote: > Just for the hell of it, try making all 4 of the density folders: > Drawable-xhdpi, Drawable-hdpi, Drawable-mdpi, Drawable-ldpi and putting the > my_list.xml in each. > > > On Tue, Jul 23, 2013 at 10:06 AM, Samus Arin <samusa...@gmail.com> wrote: > >> >> http://stackoverflow.com/questions/8859888/strange-exception-about-resource-not-found >> >> >> On Tue, Jul 23, 2013 at 10:03 AM, Samus Arin <samusa...@gmail.com> wrote: >> >>> http://stackoverflow.com/questions/10852711/getdrawable-returning-null >>> >>> >>> On Tue, Jul 23, 2013 at 10:01 AM, Samus Arin <samusa...@gmail.com>wrote: >>> >>>> I just scanned my entire solution (its an enterprise class tablet app), >>>> and I'm not using Resource.GetDrawable() (it's commented out a few times, >>>> so I may have had trouble with it too)... >>>> >>>> Are you looking to manipulate the layout or something, like maybe >>>> change some of its properties based on run-time values/inputs ? >>>> >>>> >>>> On Tue, Jul 23, 2013 at 9:54 AM, Samus Arin <samusa...@gmail.com>wrote: >>>> >>>>> Sorry, scratch that, I was confusing SetBackgroundResources() vs >>>>> SetBackgroundDrawable() >>>>> >>>>> >>>>> On Tue, Jul 23, 2013 at 9:50 AM, Samus Arin <samusa...@gmail.com>wrote: >>>>> >>>>>> Oh, try using GetResource(...) instead of GetDrawable(...) >>>>>> >>>>>> >>>>>> On Tue, Jul 23, 2013 at 9:47 AM, Samus Arin <samusa...@gmail.com>wrote: >>>>>> >>>>>>> Are u sure your not confusing the drawable layout file name with the >>>>>>> id-string of the root view inside the layout file (just a precautionary >>>>>>> question) >>>>>>> On Jul 23, 2013 9:44 AM, "Kai Xin" <xinkai...@gmail.com> wrote: >>>>>>> >>>>>>>> I cleaned and rebuilt it but still got the error. >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Jul 23, 2013 at 2:06 PM, Samus Arin <samusa...@gmail.com>wrote: >>>>>>>> >>>>>>>>> Try cleaning your proj/solution >>>>>>>>> On Jul 23, 2013 8:58 AM, "Kai Xin" <xinkai...@gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> I have an xml file named "my_layerlist.xml" in the drawable >>>>>>>>>> and drawable-hdpi folder, which contains a layler-list. Then I want >>>>>>>>>> to get >>>>>>>>>> the instance of the layler list by: >>>>>>>>>> >>>>>>>>>> LayerDrawable layerDrawable = >>>>>>>>>> (LayerDrawable)Resources.GetDrawable(Resource.Drawable.my_layerlist); >>>>>>>>>> >>>>>>>>>> I got this error: >>>>>>>>>> Android.Content.Res.Resources+NotFoundException: File >>>>>>>>>> res/drawable-hdpi/my_layerlist.xml from drawable resource ID >>>>>>>>>> #0x7f02001e >>>>>>>>>> >>>>>>>>>> The resource exists in the Resource.Designer.cs: >>>>>>>>>> public partial class Drawable >>>>>>>>>> { >>>>>>>>>> // aapt resource value: 0x7f02001e >>>>>>>>>> public const int my_layerlist = 2130837534; >>>>>>>>>> ... ... >>>>>>>>>> } >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Does anyone know what the problem is? >>>>>>>>>> >>>>>>>>>> Thanks a lot >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Monodroid mailing list >>>>>>>>>> Monodroid@lists.ximian.com >>>>>>>>>> >>>>>>>>>> UNSUBSCRIBE INFORMATION: >>>>>>>>>> http://lists.ximian.com/mailman/listinfo/monodroid >>>>>>>>>> >>>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Monodroid mailing list >>>>>>>>> Monodroid@lists.ximian.com >>>>>>>>> >>>>>>>>> UNSUBSCRIBE INFORMATION: >>>>>>>>> http://lists.ximian.com/mailman/listinfo/monodroid >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Monodroid mailing list >>>>>>>> Monodroid@lists.ximian.com >>>>>>>> >>>>>>>> UNSUBSCRIBE INFORMATION: >>>>>>>> http://lists.ximian.com/mailman/listinfo/monodroid >>>>>>>> >>>>>>>> >>>>>> >>>>> >>>> >>> >> >
_______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid