You *can't* embed and use resources in mere managed library at all. This has been known and unchanged. Android resources need to be handled in Java/Android manner and .NET resources have nothing to do with that.

The only way you can embed resources in library is to build an Android Library project, archive bin, res and assets in a zip and then add it as LibraryProjectZip in a Java Binding project. Then, it is *doable*. And yet, that needs 4.2.5 beta to get it working properly.

Embedding AndroidResource in pure managed dll will be supported in future releases at some point, but right now you just can't. We have some working code but it needs to be verified to be stable.

Atsushi Eno

Kirby wrote:
I thought also I could use this as a workaround but this approach
unfortunately does not work with layout files… Inside those layout files you
have usually some views with Ids (in order to find them programmatically and
replace text or whatever). This system works out of the box with the android
resource system but when you load them manually (e.g. as XML embedded
resource) you would have to parse them manually and bypass such functions as
“FindViewById” etc. The automatic creation of Ids (e.g. @+Id/layout/myview)
does not work anymore and so on…

Don’t get me wrong – I do not say it does not work. I’m just saying this is
definitely the wrong approach and will lead to much more work (and problems
I guess).

Kirby

P.S.: Is there ANY project out there which is a standalone library (in C# -
not Java) having UI parts and using resources? Maybe a reusable library
containing a widget or something similar?





--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Android-Library-Projects-and-Resources-tp5711111p5711119.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to