craig wrote:
Also I have determined that the resource IDs becoming out of synch between
main project and the bound JAR project is a problem.
Correct, they can be out of sync.
If you compile the java project as a Library project instead of a normal
project then it will make all the resource ID fields NOT final, which is
important otherwise the values will be inlined.
So that is what I have done which should allow me to inject my own resource
id values in place of the old ones so as to keep everything in synch.
Right, yet I'm not sure what *you* did there - ADT builds the library
project's R.java without final. My fix for this issue doesn't involve
anything here (and won't, unless I miss any extra task to do).
Originally my idea was to use reflection to iterate the mono for android
Resource class and transfer the id values from there to the
com.actionbarsherlock.R class when the program is first run. I did
implement this but found it to be a little slow since reflection is quite
slow. Of course if I were running on an actual device instead of the
emulator then it would probably be faster, but still it is slow.
Anyways my latest attempt is to delete the R class from the JAR file, and to
modify the main project file so that each time the project is built it
automatically generates a duplicate of the original R.java file for the main
project, except with a different package: com.actionbarsherlock. After the
duplicated R class file is created it is placed in the
obj/Debug/android/src/com/sherlock folder. I've manually tested this a
couple times and the concept seems to work. However, I'm not very good with
MSBuild. Any ideas how to achieve this?
Something like, creating some external tool that uses FileSystemWatcher
to detect the file change and then create the modified copy of it?
It is (turned out to be) all about adding this external R.java files,
and they are also mere copy of the application R.java in Java, using the
Android SDK tool (aapt). Hence your approach should work just like Java
Android apps.
Atsushi Eno
Thanks.
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/ActionBarSherlock-tp5710482p5710835.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
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