How make Android self components and use it from a jar library? How make Android self components and use it from a jar library? xml xml

How make Android self components and use it from a jar library?


I'm trying to create an android component that can be easily added to android projects as a jar library.

If you want reuse code and resources, it won't be possible to do it with a jar file. You'll need to convert your library to a library project.

Then I import this project as a jar library into another project. To create my graphic components in the new project, I must change the path below:

If you're using a library project, you'd still reference the custom attribute as if it were contained in the application (since android will merge all the resources together when the application is compiled):

xmlns:app="http://schemas.android.com/apk/res/com.component.mypackage"