启动活动tabhost内 [英] Starting activity inside the tabhost

查看:97
本文介绍了启动活动tabhost内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个tabbased应用程序。在我的标签我有带productcells列表视图。当用户点击该行新的活动推出。是否有可能开始新的活动正常,但没有丢失了的TabBar底部。因为现在我的TabBar走了,当我开始新的活动。就像在iOS导航层次结构?

I have a tabbased application. On one of my tabs I have a listview with productcells. When the user taps the row a new activity is launched. Is it possible to start the new activity as normal but without "losing" the tabbar at the bottom. Because now my tabbar is gone when I start the new activity. Much like the navigation hierachy on iOS?

推荐答案

这是你在找什么:

http://blog.henriklarsentoft.com/2010/07/android-tabactivity-nested-activities/

这基本上说明了如何使用的ActivityGroup 来达到这样的效果。我通常不推荐这种方法,不仅是因为有时会皮塔来处理,而是因为它太iPhone类似。记住,你是为Android开发。

It basically explains how to use ActivityGroup to achieve that effect. I usually don't recommend this approach, not only because sometimes gets a PITA to handle but because it too iPhone-like. Remember, you are developing for Android.

编辑:的问候穆尔的评论......这不是狂热的问题(我连自己的iPhone)。那么,什么是错在做Android应用程序在iPhone的方法吗?基本上,Android操作系统不是设计以这种方式被使用。例如,嵌套选项卡:使用的ActivityGroup 迫使你手动处理后退按钮,这些活动本身不因为他们应该工作(你做什么用的ActivityGroup 越来越活动的意见和他们一起玩),你必须创建公共静态非最终对象来处理简单的事情,像显示一个对话框,等等。

with regards to Mur's comment... it's not a matter of fanaticism (I even own an iPhone). So what's wrong with doing Android apps in the iPhone way? Basically, the Android OS is not designed to be used in that way. For instance, the nested tabs: using ActivityGroup forces you to handle the back button manually, the activities themselves don't work as they should (what you do with ActivityGroup is getting the Activities' Views and play with them), you have to create public static non-final objects to handle simple things like showing a dialog, etc.

随便说。

这篇关于启动活动tabhost内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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