Home » Android » user interface – Creating an Android UI library that has a customisable front end

user interface – Creating an Android UI library that has a customisable front end

Posted by: admin June 15, 2020 Leave a comment

Questions:

I have several custom UI elements that are to be used in several projects. Each project will use the same UI elements but have a different looking front end.

eg: Background images for button types will be different depending on the project.

How do I package the UI classes and resources in such a way so that projects can use them while being able to modify the look and feel?

How to&Answers:

Use Android library project, that will be shared among multiple apps. Provide there default graphics.
When you provide customized graphics in your app for particular file in res folder, it will be used instead of default graphics in library. This way you can replace needed graphics set while using same code base.

Info:
https://developer.android.com/tools/projects/index.html#LibraryProjects