问题描述
我要发展为Android手机作为平板电脑的应用程序。该应用程序的逻辑是一样的,而用户界面是完全不一样的。我不知道我应该如何处理这样的:1让两个大的应用程序,或者手机的应用程序和平板电脑的应用程序(然后上传2的apk作为市场1应用程序)
I have to develop an application for both Android phones as tablets.The application logic is the same, while the UI is completely different.I'm wondering how I should deal with this: make 1 big app for both, or an app for phone and an app for tablet (and then upload the 2 apk's as 1 app in the market).
当我做1个应用程序,我应该检查,如果是手机或平板电脑在code重定向到适当的活动。我也应该包括兼容性code,使其编译手机。如果我会做2的应用程序,我不需要那个检查,我也不需要包括兼容性code,因此应用程序将是小了很多。但在这种情况下,我不得不从一个项目复制/粘贴应用逻辑不断另一个同时发展。
When I make 1 application, I should check if it's phone or tablet in code to redirect to the appropriate activity. Also I should include compatibility code to make it compile for phones.If I would make 2 apps, I don't need that check and I also don't need to include the compatibility code, so the app would be a lot smaller. But in that case I'll have to copy/paste the application logic constantly from one project to the other one while development.
所以这就是为什么我想知道,什么是在这种情况下,最好的做法是什么?我一直在寻找这方面的信息,但我只找到如何管理它的不同的XML布局,或者没有那么多的资料篇的文章。
So that's why I'm wondering, what's the best practice in this case?I've been searching for information about this, but I only find articles about how to manage the different xml layouts, or articles with not so much information in it.
推荐答案
我的答案,一个应用程序。该 iosched - 谷歌I / O应用程序从谷歌I / O的Android 演示的例子解释了有关全部的寄托如何以及什么。来源$ C $ C可用!值得一试吧!
My Answer, one app. The iosched - Google I/O App for Android demo example from Google I/O explains everthing about how and what. Source Code available! Worth trying it!
的.apk下载链接: http://www.mediafire.com/?wck52jweyz1
Apk Download Link : http://www.mediafire.com/?wck52jweyz1
这篇关于1或2的应用程序:用于手机和平板电脑的Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!