android标签栏导航 [英] android tab bar navigation

查看:112
本文介绍了android标签栏导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的android选项卡中有两个选项卡,其中有一个如何从一个活动移动到另一个活动。

解决方案

请参阅 [选项卡导航]给定链接中的部分。


您可以阅读这篇文章在TabHost中使用Android ActivityGroup显示不同的活动 [ ^ ]。使用 tabhost [ ^ ]包含不同的活动。



示例:

 TabHost tabHost = getTabHost(); 

tabHost.addTab(tabHost.newTabSpec(tab1)。setIndicator(Activity1)。setContent(
new Intent(this,Activity1.class)));
tabHost.addTab(tabHost.newTabSpec(tab2)。setIndicator(Activity2)。setContent(
new Intent(this,Activity2.class)));


There are two tabs in my android tab inside activies there how to move from one activity to another.

解决方案

Please refer to the [Tab Navigation ] Section in the given link.


You can read this article Use Android ActivityGroup within TabHost to show different Activity[^]. use tabhost[^] to contain different activities.

Example:

TabHost tabHost = getTabHost();

        tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator("Activity1").setContent(
                new Intent(this, Activity1.class)));
        tabHost.addTab(tabHost.newTabSpec("tab2").setIndicator("Activity2").setContent(
                new Intent(this, Activity2.class)));


这篇关于android标签栏导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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