I am trying to export my custom layout classes as a .jar file to reuse in my other applications. Is this possible? I was thinking I could do this then just add the needed开发者_如何学Go xml files to the project where I am importing the jar. Is there a way to export the xml files with the jar (I'm guessing no).
You need to use Android Library Projects. Define your layout classes in a project that you declare as an Android Library Project, you can then include library that into other Android projects. Full instructions are at the lined article.
You can't export xml files with your jar. Only classes.
If you don't want to release the source code but only the jar you can make an hybrid library project with resources and the jar.
In this site there are all these cases: http://andparcel.com/
精彩评论