登录
首页 » Android » Android TabHost嵌套用法示例

Android TabHost嵌套用法示例

于 2022-12-13 发布 文件大小:126.18 kB
0 136
下载积分: 2 下载次数: 1

代码说明:

本源代码演示Android TabHost组件嵌套的用法示例,屏幕上部和底部均出现TAb,下部的TAB是在上部指定TAB激活时才显示,实现了双层嵌套的TAB视图效果。本例子继承了TabActivity,注意:在设置双层嵌套时,要注意其TAB的顺序,若错乱可能会导致嵌套失败。   对于TabHost、布局文件中必须包含TabHost、TabWidget 、FrameLayout ,如果继承TabActivity,并且通过getTabHost()方法来获取TabHost,那么三者的ID必须是android.R.id.tabhost、android.R.id.tabs、android.R.id.tabcontent,如果继承Activity,可以通过findViewById来获取这三个组件,此时ID可自定义。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • listview 下拉刷新 android示例源码下载
    listview 下拉刷新 android示例源码下载
    2014-04-13下载
    积分:1
  • android 异步 执行 任务 例子 附讲解
    Rules::The AsyncTask instance must be created in UI thread. .execute must be invoked on the UI thread.Never call  objMyTask.onPreExecute(), objMyTask.doInBackground(), objMyTask.onProgressUpdate(),  objMyTask.onPostExecute manually.The AsyncTask can be executed only once (an exception will be thrown if a second execution is attempted.)AsyncTask have Four Main Method... onPreExecute()  doInBackground() onProgressUpdate() onPostExecute()  onPreExecute-This method is called first when you start AsyncTask using objAsync.execute().And mostly this method is use for initializing dialog(ProgressDialog,CustomDialog) and showing. doInBackground-The main purpose of AsyncTask is accomplished by this method.Any non-UI thread process is running in this method.Such as Rss Feed Reader,Image and video Uploading and Downloading.You cant handle your View in this method.Because this method is non-UI thread.While any background process is running if you want to handle UI therea are  onProgressUpdate method. after completion of process this method send result to OnPostExecute. onProgressUpdate-While backgrounding task is running ,you can handle your UI using this method .Such as status of downloading or uploading task.and this method is called from  doInBackground.Using publishProgress() you can call onProgressUpdate method to update UI while process is running. onPostExecute -This method is called after the background computation finishes.The result of background process in passed in this method as parameters.And now you can dismiss progress dialog ,to indicate that background task is completed. You can cancel AsyncTask using objAsyncTask.cancel().then you just check in doInBackground, if (isCancelled()) { break; } else {        //continue... } See this Image For more Clear.
    2013-07-05下载
    积分:1
  • demo.voice_recognition
    科大讯飞的语音开发包,可以在android下进行语音识别产品的开发!(IFLYTEK MSC development guide, instruct users under ANDROID speech recognition product development.)
    2013-08-18 20:16:55下载
    积分:1
  • RxDemo
    使用RxAndroid使用案例,各种的使用方式介绍,为什么要50字使用RxAndroid使用案例,各种的使用方式介绍,为什么要50字使用RxAndroid使用案例,各种的使用方式介绍,为什么要50字使用RxAndroid使用案例,各种的使用方式介绍,为什么要50字使用RxAndroid使用案例,各种的使用方式介绍,为什么要50字使用RxAndroid使用案例,各种的使用方式介绍,为什么要50字使用RxAndroid使用案例,各种的使用方式介绍,为什么要50字使用RxAndroid使用案例,各种的使用方式介绍,为什么要50字
    2023-04-29 04:50:07下载
    积分:1
  • 安卓Android 学习实验资料【简单】
    看上去这是一些比较简单的安卓Android 实验相关源码,涉及一些简单的基础操作,像是编写的游戏,里面包括了登录验证,简单界面设计等:实验的内容包括:   从布局文件activityx_main.xml加载一个布局文件   通过Id来获取布局文件中的按钮   判断用户名和密码是否为空或长度为0   Android新手学习参考吧。
    2022-05-30 19:34:11下载
    积分:1
  • wifi语音对讲
    实现局域网内语音对讲发送文字
    2013-06-29下载
    积分:1
  • android xmpp 即时聊天
    应用背景Extensible Messaging and Presence Protocol(XMPP)——可扩展消息与表示协议, 是由Jabber 开源社区贡献的一个基于XML的通信协议,它是被广泛应用的四大即时通信协议之一。Google 的即时通信软件GTalk 就是基于XMPP协议的。这次Google 推出Android,当然不会忘记XMPP,为它编写了相应的API 和Demo,现在就让我们从Google提供的Demo开始,一步步了解Android上的XMPP应用。关键技术    import java.io.BufferedInputStream;   import java.io.BufferedReader;   import java.io.ByteArrayInputStream;   import java.io.File;   import java.io.FileInputStream;   import java.io.IOException;   import java.io.InputStreamReader;   import java.net.URL;   import java.net.URLConnection;   import java.util.ArrayList;   import java.util.Collection;   import java.util.HashMap;   import java.util.Iterator;   import java.util.Lis
    2022-06-03 08:16:58下载
    积分:1
  • 视频和音频捕捉和记录的源代码
    这个程序函数作为提1.使用麦克风录音。2.用摄像机录像。3.将此文件存储在 sd 卡中。
    2022-12-16 23:30:03下载
    积分:1
  • android菜单
    android界面跳转菜单,完整代码,希望对你们有帮助,主要有三个java文件,对应生成布局页面,菜单页面,所有布局都是对应layout的,所以封装性还好。 public class MyActivity extends Activity { private LinearLayout home_img_bn_Layout, style_img_bn_layout, cam_img_bn_layout, shopping_img_bn_layout, show_img_bn_layout; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE);
    2022-02-01 12:26:52下载
    积分:1
  • OpenWnn Android输入法源代码
    OpenWnn Android输入法源代码-OpenWnn Android source code input method
    2023-08-25 21:50:05下载
    积分:1
  • 696518资源总数
  • 105877会员总数
  • 14今日下载