[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread Kumar Bibek
I don't think so it is possible. Thanks and Regards, Kumar Bibek On Mar 21, 8:34 pm, HippoMan hippo.mail...@gmail.com wrote: I'd like to do some additional code generation after the R.java file has been created by aapt. Specifically, I want to auto-generate some helper methods to retrieve

[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread Bob Kerns
Sure. I wouldn't recommend messing with the actual code that generates R.java. Too many potential compatibility problems, etc. Instead, I'd just use an xslt ant task to generate your helper class -- call it X -- and make it import R. If you like, you can even make it a subclass (and give it

[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
On Mar 21, 1:28 pm, Kumar Bibek coomar@gmail.com wrote: I don't think so it is possible. Thank you, but after much digging around, I figured out that this is indeed possible. Here's what I did (under MacOSX; it should work the same under Linux, but there will no doubt be slight differences

[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
On Mar 21, 4:13 pm, Bob Kerns r...@acm.org wrote: [ ... ] Instead, I'd just use an xslt ant task to generate your helper class -- call it X -- and make it import R. If you like, you can even make it a subclass (and give it inner classes that are subclasses of R's inner classes). [ ...

[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread Bob Kerns
Actually, mine runs as part of the normal build process too. Using ant builder instead of a program builder gives you full cross-platform compatibility. We're both adding builders, just different types. Either one will work fine. But I recommend an ant builder over a program builder, because

[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
On Mar 21, 7:34 pm, Bob Kerns r...@acm.org wrote: Actually, mine runs as part of the normal build process too. Using ant builder instead of a program builder gives you full cross-platform compatibility. We're both adding builders, just different types. Either one will work fine. But I

[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
On Mar 21, 8:48 pm, HippoMan hippo.mail...@gmail.com wrote: Also, I can't figure out how to get my auto-generated class to refresh in the IDE after it gets re-created. I have to select Refresh or hit F5 in order for any changes to be noticed. If I use ant, will I be able to force the refresh

[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
Never mind. I just didn't have proper Refresh settings. I fixed them, and now everything refreshes the way it's supposed to. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to