[mono-android] Getting the xml file for a view resoruce
quan
rhys.walden at gmail.com
Sat Nov 26 22:06:35 EST 2011
Hi,
I have been having trouble for the last week with a certain problem, i have
googled it and have so far not been able to solve it.
The problem is the following:
Reading the AXML file of the view that is saved in the resources/layout
folder.
Now it seems if i was programming nativally and not using Mono, there are
methods on the context.Resources object that would allow me to access the
xml like:
- getLayout(int id)
- getXml(int id)
both these method would return a XmlResourceParser (which is not excatly
what i want but would do for now)
and in the AssetManager there are some method which might also work.
openXmlResourceParser
but none of these methods in the two classes seem to be implemented at all
in mono do not exist in the mono version. I have read every post i could
inculding the following
http://lists.ximian.com/pipermail/monodroid/2010-November/001749.html
but it is a android view im trying to load so i cant store as a embedded
resource.
When i load it using the resources.OpenRawResource(int id) method i get the
following output
http://mono-for-android.1047100.n5.nabble.com/file/n5025833/Capture.png
i have tried different encoding when reading it an well as but they always
give me the same sort of text ouptput. i though that it might be compressed
so i have tried using both gzipstream and ICShapeZip (as the
andriod.util.zip dosn't seem to exists. but that just either throws an
exception or just gives me empty string.
The post above says that it is complied so im guessing they mean a byte
serialized stream repersenting the view.
does anyone know how i could get the raw XML file of the AXML file.
I'm targeting android 2.2.
Thank you
--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/Getting-the-xml-file-for-a-view-resoruce-tp5025833p5025833.html
Sent from the Mono for Android mailing list archive at Nabble.com.
More information about the Monodroid
mailing list