1

My application consists of tabs using Tabhost and Activity group. It is working well for now. However, I am told to extend the app to support tablet. The current app seems to work in tablet, with less space utilization. I am told to use split views in few screens.

As a result, I made a rigorous study on extending the design. One proposal is to use fragments. This eventually necessitates a major design change and consumes more time. The other one is to tweak the existing code to extend support which is far less recommended.

The app is aimed to support all Android versions above 2.2

Could anyone guide me a better solution?

EDIT:

I am already using new layout naming conventions.

layout-sw600dp
layout-sw800dp

For current smartphone version, say for instance, a screen has list view as

Item A
Item B
Item C

Tapping any item opens a new activity in the activity group showing the details.

But in tablet, the above two features are brought to a single layout using split view.

Item A   |
Item B   |   Item details
Item C   |

I am stuck with implementing the above feature. Can I use fragments inside ActivityGroup?

Renjith
  • 3,457
  • 5
  • 46
  • 67
  • 4
    Fragments are there for exactly this purpose. I don't think you should take a shortcut, it will not pay off in the end. – span Mar 19 '13 at 09:38
  • 1
    I agree with @span, but would also like to present the option make use of Android's provisions for supporting different screen sizes by putting resources in qualified resource folders, like /res/layout-large or /res/layout-landscape, all of which is documented at d.android.com Whether it will or will not pay of in the end depends on your current code, screen design etc. – baske Mar 19 '13 at 09:42
  • I prefer Fragments too. But, I am bit vague on how to implement in my scenario. The app contains 4 tabs. Each tab is itself an ActivityGroup with child activities. So how do I move forward with fragments? – Renjith Mar 19 '13 at 09:42
  • you should use the more up to date layout alias' eg: sw600dp, see - http://developer.android.com/guide/practices/screens_support.html – Neil Mar 19 '13 at 09:48

0 Answers0