zoukankan      html  css  js  c++  java
  • 标签控件

    标签控件

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent">
      <TextView
      android:text="选项一内容"
      android:textSize="50dp"
      android:id="@+id/bq1"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"/>
      <TextView
      android:text="选项二内容"
      android:textSize="50dp"
      android:id="@+id/bq2"
      android:textColor="#FFFF00"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"/>
      <TextView
      android:text="选项三内容"
      android:textSize="50dp"
      android:id="@+id/bq3"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"/>
    </LinearLayout>
    package com.xy;
    
    import android.app.TabActivity;
    import android.os.Bundle;
    import android.view.LayoutInflater;
    import android.widget.TabHost;
    
    public class bq extends TabActivity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            TabHost tabHost=getTabHost();
            LayoutInflater.from(this).inflate
            (R.layout.bq,tabHost.getTabContentView(),true);
            tabHost.addTab(tabHost.newTabSpec("tab1").
                    setIndicator("选项一").setContent(R.id.bq1));
            tabHost.addTab(tabHost.newTabSpec("tab2").
                    setIndicator("选项二").setContent(R.id.bq2));
            tabHost.addTab(tabHost.newTabSpec("tab3").
                    setIndicator("选项三").setContent(R.id.bq3));
        }
    }
  • 相关阅读:
    P1486 [NOI2004]郁闷的出纳员
    P1966 火柴排队
    P2627 修剪草坪
    P1621 集合
    P1025 数的划分
    中国剩余定理
    P2043 质因子分解
    P1075 质因数分解
    C#之引用类型参数
    C#之方法的定义及调用学习案例
  • 原文地址:https://www.cnblogs.com/1396493331qq/p/6908851.html
Copyright © 2011-2022 走看看