In Mono for Android the generated resource file is named Resource instead of
R. Taken from the sample I linked to:

AddPreferencesFromResource(Resource.Xml.settings);

Note that this also implies that you've defined the XML file in the
appropriate folder (settings.xml, in the case of my example):

https://github.com/gshackles/Sample-Projects/blob/master/MonoDroid/MonoDroidSamples/MonoDroidSamples/Resources/xml/settings.xml

On Wed, Aug 17, 2011 at 9:39 AM, Nicklas Møller Jepsen <n...@blueposition.com
> wrote:

>  Thank you for the answer but the function is not the problem.****
>
> I have access to the function. The problem is I’m unable to use
> R.xml.preferences.****
>
> I’m trying to do the following:
> http://stackoverflow.com/questions/2697233/how-to-add-a-button-to-preferencescreen
> ****
>
> ** **
>
> ** **
>
> *From:* monodroid-boun...@lists.ximian.com [mailto:
> monodroid-boun...@lists.ximian.com] *On Behalf Of *Greg Shackles
> *Sent:* 17. august 2011 15:35
> *To:* Discussions related to Mono for Android
> *Subject:* Re: [mono-android] R.xml.preferences****
>
> ** **
>
> You'll get access to that function once you subclass PreferenceActviity. I
> have an example up here:****
>
> ** **
>
>
> https://github.com/gshackles/Sample-Projects/blob/master/MonoDroid/MonoDroidSamples/MonoDroidSamples/DemoActivities/Preferences/UpdatePreferencesActivity.cs
> ****
>
> On Wed, Aug 17, 2011 at 9:31 AM, Nicklas Møller Jepsen <
> n...@blueposition.com> wrote:****
>
> How do I do the following in Monodroid:****
>
> addPreferencesFromResource(R.xml.preferences);****
>
>  ****
>
> Thanks, Nicklas****
>
>  ****
>
>
> _______________________________________________
> 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

Reply via email to