有可能包含在一个Android罐子布局和其他资源? [英] It is possible to include layout and other resources in an Android jar?
问题描述
我建立一个罐子,以便其他开发人员可以使用我在自己的Android应用程序创建视图。我不知道是否有可能使用布局资源在我的瓶子,所以我可以建立我的视图的布局,或者如果我需要以编程方式建立我的看法。同样,我可以包括图片资源在我的jar文件?
I'm building a jar so that other developers can use the view I create in their Android applications. I'm wondering if it is possible to use a layout resource in my jar so I can build the layout of my view or if I need to build up my view programmatically. Similarly, can I include image resources in my jar file?
推荐答案
没有,目前还无法。因为在APK方式Android包的资源,你无法将它们包含在一个罐子里。但是,您仍然可以与其他开发人员共享的罐子 - 他们只好在布局文件,手动拉
No, not currently. Because of the way Android packages resources in an apk, you can't include them in a jar. However, you can still share the jar with the other developers - they'll just have to manually pull in the layout files.
这篇关于有可能包含在一个Android罐子布局和其他资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!