jberkel / android-plugin

An sbt plugin for Android development in Scala
https://groups.google.com/forum/#!forum/scala-on-android
Other
476 stars 113 forks source link

generate TypedResources from all layout folders #167

Closed Yarikx closed 11 years ago

Yarikx commented 11 years ago

Search all "layout*" folders for xml files.

Useful for case when you have resources for different configurations as "layout" and "layout-land"

appamatto commented 11 years ago

I merged this. Note that the TypedResources code wouldn't handle collisions in layout names properly (layout/foo.xml and layout-land/foo.xml would cause an error). I fixed this, and also cleaned up the PathFinder code that you submitted so that it selects only files from res/layout*/*.xml and not from descendants recursively.

On the whole I think this patch might break some of the type safety around layouts, since only the layouts in the main layout directory are guaranteed to be there for all screen sizes and orientations.

Yarikx commented 11 years ago

Thanks. May be I didn't think about some issues (it was mostly hotfix to compile my project =) ), so thanks for cleaning this code.

appamatto commented 11 years ago

Thanks for the patch!