我可以创建一个Android应用程序作为模板吗? [英] Can i create an android application as template?

查看:72
本文介绍了我可以创建一个Android应用程序作为模板吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定它的标题是否正确,但请解释我的意思. 我制作了多个Android应用程序,但它们具有相同的结构 滑动菜单,列表视图,关于我,带有(复制,共享,喜欢)的服装对话框 并对样式进行了一些修改(颜色,背景,字体,菜单字符串)

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 ?

推荐答案

基本上,您要创建一个Android library.只需像普通应用程序一样使用Activitieslayout进行开发即可.

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

请按照本教程设置您的项目. http://www.vogella.com/tutorials/AndroidLibraryProjects/article.html

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

当您使用给定的库创建一个新项目时,所有代码将被静默包含在内,您将可以访问您的Activities甚至您的R类.

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.

这篇关于我可以创建一个Android应用程序作为模板吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆