Can i create an android application as template?

我与影子孤独终老i 提交于 2020-01-02 07:28:48

问题


I'm not sure if its the right title but ill explain what i mean. I'm making more than one android application, but they have the same structure sliding menu , list view , about me , costume dialog with (copy,share,like) with some modifications in the styles (colors, backgrounds , fonts , menu strings )

my qustion is : is there any way to use the structure as library or implemntation or anu other way insted of coping the same codes in every projects ?


回答1:


Basically what you want to do is to create an Android library. Just develop it like a normal application, with Activities and layout.

Please follow this tutorial to set up your project. http://www.vogella.com/tutorials/AndroidLibraryProjects/article.html

When you'll create a new project with the given library, all your code will be silently included and you'll get access to your Activities and even to your R class.




回答2:


Try Android studio - Official IDE for android development. Simple to use.

There is an option to save your project as template. Tools > Save project as template

For eclipse I think you need to write plugin https://stackoverflow.com/a/4992150/3020568



来源:https://stackoverflow.com/questions/25885452/can-i-create-an-android-application-as-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!