If the idea gets some support I might do what you've suggested. Thanks for the idea.
Al. On Jun 23, 12:21 pm, Mark Murphy <mmur...@commonsware.com> wrote: > Conceptually, the notion seems sound. However, I'm here to encourage > you to "Just Do It". > > On Wed, Jun 23, 2010 at 3:47 AM, Al Sutton <a...@funkyandroid.com> wrote: > > First off; I know the implementation of this should be discussed on > > the framework list, but I'm putting this idea out on here to see if > > there is a need for it. > > This doesn't strictly need to be on the -framework list, since what > you want does not require any changes to the Android OS. You can > achieve your goals with zero modifications to anything in the AOSP. > Standardizing this would require changes to *tools*, and given a > working implementation, discussions on integrating the scheme into the > tools could probably just go straight to the -contrib list. > > > <imports> > > <import source="drawables-hdpi">icon1.png</import> > > <import source="drawables-hdpi">icon2.png</import> > > <import source="drawables-hdpi">icon3.png</import> > > < /imports> > > Here's your AOSP-mod-free implementation: > > Step #1: Modify the above XML format to be something that can live in > a resource directory but be ignored by the build tools. It might > qualify right now. It may require some tweaking. It is conceivable > that nothing will work, in which case toss it into an imports/ > directory off the project root and add a target attribute to the root > element to indicate the resource directory you were originally > planning to have the file live in. > > Step #2: Create the Android Image Importer (aii) tool. aii inject > finds the import file(s) and creates the alias XML files that you are > trying to avoid creating by hand. aii extract finds the import file(s) > and removes the alias XML files. > > Step #3: Add aii inject to your toolchain as an early step in the > build, before the first aapt call. > > Step #4: Add aii extract to your toolchain as a late step in the > build, probably at the end after the APK packaging/signing is complete > > (for Ant, I'd do steps #3 and #4 by creating wrapper tasks around ant > debug and ant install and such that does the aii inject, chains to the > main task (e.g., debug), then does the aii extract) > > (for Eclipse, you're on your own) > > Net: you get your desired functionality without any changes to AOSP, > so you can see how well your plan works in practice. > > Net++: you get a working implementation of the concept to use as a > basis for discussions with Xav and the tools team, because a "real" > implementation of the concept probably does pretty much the same > thing, just under the covers. > > Writing the aii command should take somebody maybe an hour in Ruby, or > three months in Java. :-) > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 > Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en