Android的标签活动 [英] Android tabbed Activity

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

问题描述

我创建的标签是我的课扩展TabActivity和延伸,我已经加入标签活动等5 activites。我需要从我所添加为选项卡中的5项活动得到字符串一旦点击在MainPage.java类执行

I have created tabs using intents.MainPage.java is my class that extends TabActivity and other 5 activites that extends Activity which i have added as tabs. I need to get Strings from the 5 activities which i have added as tabs once a click is performed in the MainPage.java class

推荐答案

从文档:

该TabActivity类去precated。新的应用程序应该使用
  片段,而不是此类;要继续在旧设备上运行,
  您可以使用V4支持库提供了一个版本的
  片段API已关闭甜甜圈兼容。

The TabActivity class is deprecated. New applications should use Fragments instead of this class; to continue to run on older devices, you can use the v4 support library which provides a version of the Fragment API that is compatible down to DONUT.

这里 一些的 片段 教程,以帮助您获得开始

Here are some Fragment tutorials to help you get started.

此外,检查<一href=\"http://developer.android.com/resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabs.html\"相对=nofollow> FragmentTabs.java 在开发者网站。

Also, check out FragmentTabs.java on the developer site.

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

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