Simple Android and hosttab applications

Source: Internet
Author: User

Package Org. crazyit. intent; import android. app. tabactivity; import android. content. intent; import android. OS. bundle; import android. widget. tabhost;/*** Description: * <br/> site: <a href = "http://www.crazyit.org"> crazyit.org </a> * <br/> copyright (c ), 2001-2012, yeeku. h. LEE * <br/> this program is protected by copyright laws. * <br/> program name: * <br/> date: * @ author yeeku. h. lee kongyeeku@163.com * @ version 1.0 */public class intenttab extends tabactivity {@ overridepublic void oncreate (bundle savedinstancestate) {super. oncreate (savedinstancestate); tabhost = gettabhost (); // use intent to add the first tabhost on the tab page. addtab (tabhost. newtabspec ("tab1 "). setindicator ("answered", getresources (). getdrawable (R. drawable. icon )). setcontent (new intent (this, becalledactivity. class); // use intent to add the second tab page tabhost. addtab (tabhost. newtabspec ("tab1 "). setindicator ("outgoing call "). setcontent (new intent (this, calledactivity. class); // use intent to add the third tab page tabhost. addtab (tabhost. newtabspec ("tab1 "). setindicator ("missed "). setcontent (new intent (this, nocallactivity. class);}/*****/package Org. crazyit. intent; import android. app. activity; import android. OS. bundle;/*** Description: * <br/> website: <a href = "http://www.crazyit.org"> crazy Java Alliance </a> * <br/> copyright (c ), 2001-2012, yeeku. h. LEE * <br/> this program is protected by copyright laws. * <br/> program name: * <br/> date: * @ author yeeku. h. lee kongyeeku@163.com * @ version 1.0 */public class nocallactivity extends activity {@ overridepublic void oncreate (bundle savedinstancestate) {super. oncreate (savedinstancestate); setcontentview (R. layout. no_call) ;}}/*****/package Org. crazyit. intent; import android. app. activity; import android. OS. bundle;/*** Description: * <br/> website: <a href = "http://www.crazyit.org"> crazy Java Alliance </a> * <br/> copyright (c ), 2001-2012, yeeku. h. LEE * <br/> this program is protected by copyright laws. * <br/> program name: * <br/> date: * @ author yeeku. h. lee kongyeeku@163.com * @ version 1.0 */public class calledactivity extends activity {@ overridepublic void oncreate (bundle savedinstancestate) {super. oncreate (savedinstancestate); setcontentview (R. layout. called) ;}}/*****/package Org. crazyit. intent; import android. app. activity; import android. OS. bundle;/*** Description: * <br/> website: <a href = "http://www.crazyit.org"> crazy Java Alliance </a> * <br/> copyright (c ), 2001-2012, yeeku. h. LEE * <br/> this program is protected by copyright laws. * <br/> program name: * <br/> date: * @ author yeeku. h. lee kongyeeku@163.com * @ version 1.0 */public class becalledactivity extends activity {@ overridepublic void oncreate (bundle savedinstancestate) {super. oncreate (savedinstancestate); setcontentview (R. layout. be_called );}}

<? XML version = "1.0" encoding = "UTF-8"?> <Tabhost xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent"> </tabhost> <? XML version = "1.0" encoding = "UTF-8"?> <Linearlayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: Orientation = "vertical"> <textview Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "Bai Gujing-2010/08/12" Android: textsize = "11pt"/> <textview Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: Tex T = "Spider-2010/09/20" Android: textsize = "11pt"/> </linearlayout> <? XML version = "1.0" encoding = "UTF-8"?> <Linearlayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: Orientation = "vertical"> <textview Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "daughter country king-2010/12/12" Android: textsize = "11pt"/> <textview Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: T EXT = "Dong Hailong female-2010/12/18" Android: textsize = "11pt"/> </linearlayout> <? XML version = "1.0" encoding = "UTF-8"?> <Linearlayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: Orientation = "vertical"> <textview Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "Sun Wukong-2010/09/19" Android: textsize = "11pt"/> <textview Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "-2010/10/12" Android: textsize = "11pt"/> </linearlayout>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.