开发者

Best layout design for this application(tab bar with screen transition)?

开发者 https://www.devze.com 2023-03-05 07:07 出处:网络
I need to migrate an iOS App to android, and I\'m new to Android, I\'m not sure what is the best layout design for the app:

I need to migrate an iOS App to android, and I'm new to Android, I'm not sure what is the best layout design for the app:

  1. Tab bar(with buttons on it) always on bottom of screen
  2. Each tab buttons corresponds to a screen, and each screen has a sub screen hierarchy

For example: Tab Button: Shops Screen shows: a list of shops Click on a shop: transition to shop details with address, website etc Click on address in shop detail screen: transition to map

Currently I have a TabActivity, each tab button is associated with an Activity for that button's function, inside each Activity开发者_如何学编程, I have a ViewGroup that contains a fragment, so I can replace current fragment with new one for screen transition(I tried creating new Activity but the tab bar disappears). I don't know if this is the best way to design it, or is there any better approach?


I believe what you want is a TabHost to handle the different activities: http://developer.android.com/reference/android/widget/TabHost.html

Check the tab layout example at the dev guide: http://developer.android.com/resources/tutorials/views/hello-tabwidget.html

Using Fragments will prevent you to deploy the app to any device < HoneyComb.

0

精彩评论

暂无评论...
验证码 换一张
取 消