Android的标签 - 开始一个新的活动 [英] android tabs - starting a new activity

查看:94
本文介绍了Android的标签 - 开始一个新的活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有4个选项卡在TabHost,让他们为A,B,C和D现在每个人只是一个索引页,点击其中的任何显示不同的活动。

There are 4 Tabs in a TabHost, let them be A, B, C, and D. Now each one is just an index page and clicking on any of them shows a different activity.

现在的问题是,我需要当用户选择从选项卡中显示的内容的东西,开始另一个活动。其他活动也应显示在父选项卡本身。可能吗?或者将我必须尝试别的东西吗?

The problem is that I need to start another activity when the user selects something from the content displayed in the tab. The other activity should also be displayed in the parent tab itself. Is it possible? Or will I have to try something else?

推荐答案

你不能改变你的选项卡的内容查看,而不是开始一个新的活动?

Can't you change the contentView of your tab instead of starting a new Activity ?

也许我是错了,但我也认为,开始在标签中的活动是不可能的,因为TabView的是设在一个活动,而不是相反(TabView的不承载每个选项卡中的活动)。

Maybe I'm wrong but I think also that starting an activity in a tab isn't possible because the TabView is hosted in a activity and not the opposite (Tabview don't host an activity per Tab).

这篇关于Android的标签 - 开始一个新的活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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