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 dea
I have been mulling over the same stuff, although i already have my code layouts split out for tablet / phone variants I am looking for size optimisation by using two apps, however I set out a method for using ONE code set to build both variants.
https://stackoverflow.com/questions/13956515/android-should-i-split-my-app-into-tablet-and-phone-variants
Certainly make one application.
You can create different layout files for phones and tablets. For tablets you should create extra layout file in res folder which is called layout-large (for tablets), for phone which provides default layout file, and at the same time for landscape mode you can create one more folder named as layout-large-landscape (tablets) for phones layout-landscape
and add some tags to support multiple screens:
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="9"/>
<supports-screens android:anyDensity="true" />
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 Download Link : http://www.mediafire.com/?wck52jweyz1
Certainly make one application.
Android is perfectly designed to be targeted to various devices, its automatic resource selection from res/ folders depending on device's capabilities is big help for you. You can have completely different screen layout for large screens vs small ones, for portrait vs landscape, for tablets vs phones, etc.
And your code is written/maintained just once.
Of course, you would make come conditional code depending on if your loaded layout has particular view, for example loaded only on large screen, and conditionally fill there additional data if its present.
Read documents on Android developer site about how to support multiple screens, multiple Android versions, compatibility modes with older Android versions, etc.
Also, if you ship just one app, you get single users' feedback / rating on Android Market, not in 2 separate apps.