Paul,
One more thing, I noticed - the actual method is like this;
const string lfn = "someImage.jpg";
string settings = string.Empty; // context could be ApplicationContext,
Activity or // any other object of type Context
using (var input = context.Assets.Open(lfn))
using (StreamReader sr = new System.IO.StreamReader(input)) { settings = sr.
ReadToEnd(); }
Better example of this code here -
https://github.com/xamarin/monodroid-samples/blob/master/ApiDemo/Content/ReadAsset.cs
http://docs.xamarin.com/android/advanced_topics/using_android_assets
Which is related to Resources -
http://developer.android.com/reference/android/content/res/Resources.html
Hence I was suggesting using a single NODPI solution for the RES.XML with
XSLT and SAX, which you shouldn't really need but it depends on how you
setup the Assets folder, to be mutiple device views or single, (which is
what I gather you would prefer).
Cheers!
Glen
On Mon, Apr 2, 2012 at 10:58 AM, Glen Hassell <[email protected]> wrote:
> Hi,
>
> I dont see a problem with making two references but if that is making your
> app too heavy, perhaps you might consider either using;
>
> http://www.ibm.com/developerworks/xml/library/x-tipmultxsl/index.html
>
> OR - placing the image in - drawable-nodpi and use the magic code -
> Activity.getAssets().open(...)
>
> Glen
>
> On Mon, Apr 2, 2012 at 10:51 AM, Paul Johnson <[email protected]
> > wrote:
>
>> Hi,
>>
>> I have a stylesheet in an app I'm porting over from iPhone that makes
>> reference to an image. The image is already in @drawable. Is there any way
>> I can get the stylesheet to point to the @drawable or will I need to place
>> the image in the Assets directory as well?
>>
>> If I do place it into Assets, is it automagically read in *or* do I need
>> to add some code in to read it out?
>>
>> Thanks
>>
>> Paul
>> ______________________________**_________________
>> Monodroid mailing list
>> [email protected]
>>
>> UNSUBSCRIBE INFORMATION:
>> http://lists.ximian.com/**mailman/listinfo/monodroid<http://lists.ximian.com/mailman/listinfo/monodroid>
>>
>
>
>
> --
> Glen Hassell
> Inner Technique
> http://innertech.com.au/
> Office: 03 9687 0006
> Mobile: +61 (0) 438 340 385
>
>
>
--
Glen Hassell
Inner Technique
http://innertech.com.au/
Office: 03 9687 0006
Mobile: +61 (0) 438 340 385
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid