当前位置: 首页>>代码示例>>Java>>正文


Java TabWidget.setOrientation方法代码示例

本文整理汇总了Java中android.widget.TabWidget.setOrientation方法的典型用法代码示例。如果您正苦于以下问题:Java TabWidget.setOrientation方法的具体用法?Java TabWidget.setOrientation怎么用?Java TabWidget.setOrientation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.TabWidget的用法示例。


在下文中一共展示了TabWidget.setOrientation方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ensureHierarchy

import android.widget.TabWidget; //导入方法依赖的package包/类
private void ensureHierarchy(Context context) {
    // If owner hasn't made its own view hierarchy, then as a convenience
    // we will construct a standard one here.
    if (findViewById(android.R.id.tabs) == null) {
        LinearLayout ll = new LinearLayout(context);
        ll.setOrientation(LinearLayout.VERTICAL);
        addView(ll, new LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));

        TabWidget tw = new TabWidget(context);
        tw.setId(android.R.id.tabs);
        tw.setOrientation(TabWidget.HORIZONTAL);
        ll.addView(tw, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, 0));

        FrameLayout fl = new FrameLayout(context);
        fl.setId(android.R.id.tabcontent);
        ll.addView(fl, new LinearLayout.LayoutParams(0, 0, 0));

        mRealTabContent = fl = new FrameLayout(context);
        mRealTabContent.setId(mContainerId);
        ll.addView(fl, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, 0, 1));
    }
}
 
开发者ID:lujianzhao,项目名称:AndroidBase,代码行数:23,代码来源:FragmentTabHost.java

示例2: a

import android.widget.TabWidget; //导入方法依赖的package包/类
private void a(Context context, AttributeSet attributeset)
{
    TypedArray typedarray = context.obtainStyledAttributes(attributeset, new int[] {
        0x10100f3
    }, 0, 0);
    e = typedarray.getResourceId(0, 0);
    typedarray.recycle();
    super.setOnTabChangedListener(this);
    if (findViewById(0x1020013) == null)
    {
        LinearLayout linearlayout = new LinearLayout(context);
        linearlayout.setOrientation(1);
        addView(linearlayout, new android.widget.FrameLayout.LayoutParams(-1, -1));
        TabWidget tabwidget = new TabWidget(context);
        tabwidget.setId(0x1020013);
        tabwidget.setOrientation(0);
        linearlayout.addView(tabwidget, new android.widget.LinearLayout.LayoutParams(-1, -2, 0.0F));
        FrameLayout framelayout = new FrameLayout(context);
        framelayout.setId(0x1020011);
        linearlayout.addView(framelayout, new android.widget.LinearLayout.LayoutParams(0, 0, 0.0F));
        FrameLayout framelayout1 = new FrameLayout(context);
        b = framelayout1;
        b.setId(e);
        linearlayout.addView(framelayout1, new android.widget.LinearLayout.LayoutParams(-1, 0, 1.0F));
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:27,代码来源:FragmentTabHost.java

示例3: if

import android.widget.TabWidget; //导入方法依赖的package包/类
private void ˊ(Context paramContext)
{
  if (findViewById(16908307) == null)
  {
    LinearLayout localLinearLayout = new LinearLayout(paramContext);
    localLinearLayout.setOrientation(1);
    addView(localLinearLayout, new FrameLayout.LayoutParams(-1, -1));
    TabWidget localTabWidget = new TabWidget(paramContext);
    localTabWidget.setId(16908307);
    localTabWidget.setOrientation(0);
    localLinearLayout.addView(localTabWidget, new LinearLayout.LayoutParams(-1, -2, 0.0F));
    FrameLayout localFrameLayout1 = new FrameLayout(paramContext);
    localFrameLayout1.setId(16908305);
    localLinearLayout.addView(localFrameLayout1, new LinearLayout.LayoutParams(0, 0, 0.0F));
    FrameLayout localFrameLayout2 = new FrameLayout(paramContext);
    this.ˋ = localFrameLayout2;
    this.ˋ.setId(this.ᐝ);
    localLinearLayout.addView(localFrameLayout2, new LinearLayout.LayoutParams(-1, 0, 1.0F));
  }
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:21,代码来源:FragmentTabHost.java

示例4: ensureHierarchy

import android.widget.TabWidget; //导入方法依赖的package包/类
private void ensureHierarchy(Context context) {
    // If owner hasn't made its own view hierarchy, then as a convenience
    // we will construct a standard one here.
    if (findViewById(android.R.id.tabs) == null) {
        LinearLayout ll = new LinearLayout(context);
        ll.setOrientation(LinearLayout.VERTICAL);
        addView(ll, new LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT));

        TabWidget tw = new TabWidget(context);
        tw.setId(android.R.id.tabs);
        tw.setOrientation(TabWidget.HORIZONTAL);
        ll.addView(tw, new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT, 0));

        FrameLayout fl = new FrameLayout(context);
        fl.setId(android.R.id.tabcontent);
        ll.addView(fl, new LinearLayout.LayoutParams(0, 0, 0));

        mRealTabContent = fl = new FrameLayout(context);
        mRealTabContent.setId(mContainerId);
        ll.addView(fl, new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT, 0, 1));
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:28,代码来源:FragmentTabHost.java

示例5: ensureHierarchy

import android.widget.TabWidget; //导入方法依赖的package包/类
private void ensureHierarchy(Context context) {
	// If owner hasn't made its own view hierarchy, then as a convenience
	// we will construct a standard one here.
	if (findViewById(android.R.id.tabs) == null) {
		LinearLayout ll = new LinearLayout(context);
		ll.setOrientation(LinearLayout.VERTICAL);
		addView(ll, new LayoutParams(
				ViewGroup.LayoutParams.MATCH_PARENT,
				ViewGroup.LayoutParams.MATCH_PARENT));

		TabWidget tw = new TabWidget(context);
		tw.setId(android.R.id.tabs);
		tw.setOrientation(TabWidget.HORIZONTAL);
		ll.addView(tw, new LinearLayout.LayoutParams(
				ViewGroup.LayoutParams.MATCH_PARENT,
				ViewGroup.LayoutParams.WRAP_CONTENT, 0));

		FrameLayout fl = new FrameLayout(context);
		fl.setId(android.R.id.tabcontent);
		ll.addView(fl, new LinearLayout.LayoutParams(0, 0, 0));

		mRealTabContent = fl = new FrameLayout(context);
		mRealTabContent.setId(mContainerId);
		ll.addView(fl, new LinearLayout.LayoutParams(
				LinearLayout.LayoutParams.MATCH_PARENT, 0, 1));
	}
}
 
开发者ID:dscn,项目名称:ktball,代码行数:28,代码来源:MyFragmentTabHost.java

示例6: ensureHierarchy

import android.widget.TabWidget; //导入方法依赖的package包/类
private void ensureHierarchy(Context context) {
    // If owner hasn't made its own view hierarchy, then as a convenience
    // we will construct a standard one here.
    if (findViewById(android.R.id.tabs) == null) {
        LinearLayout ll = new LinearLayout(context);
        ll.setOrientation(LinearLayout.VERTICAL);
        addView(ll, new FrameLayout.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.FILL_PARENT));

        TabWidget tw = new TabWidget(context);
        tw.setId(android.R.id.tabs);
        tw.setOrientation(TabWidget.HORIZONTAL);
        ll.addView(tw, new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT, 0));

        FrameLayout fl = new FrameLayout(context);
        fl.setId(android.R.id.tabcontent);
        ll.addView(fl, new LinearLayout.LayoutParams(0, 0, 0));

        mRealTabContent = fl = new FrameLayout(context);
        mRealTabContent.setId(mContainerId);
        ll.addView(fl, new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.FILL_PARENT, 0, 1));
    }
}
 
开发者ID:GigigoGreenLabs,项目名称:permissionsModule,代码行数:28,代码来源:FragmentTabHost.java

示例7: ensureHierarchy

import android.widget.TabWidget; //导入方法依赖的package包/类
private void ensureHierarchy(Context context) {
    // If owner hasn't made its own view hierarchy, then as a convenience
    // we will construct a standard one here.
    if (findViewById(android.R.id.tabs) == null) {
        LinearLayout ll = new LinearLayout(context);
        ll.setOrientation(LinearLayout.VERTICAL);
        addView(ll, new LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.FILL_PARENT));

        TabWidget tw = new TabWidget(context);
        tw.setId(android.R.id.tabs);
        tw.setOrientation(TabWidget.HORIZONTAL);
        ll.addView(tw, new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT, 0));

        FrameLayout fl = new FrameLayout(context);
        fl.setId(android.R.id.tabcontent);
        ll.addView(fl, new LinearLayout.LayoutParams(0, 0, 0));

        mRealTabContent = fl = new FrameLayout(context);
        mRealTabContent.setId(mContainerId);
        ll.addView(fl, new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.FILL_PARENT, 0, 1));
    }
}
 
开发者ID:huscarter,项目名称:RxBusDemo,代码行数:28,代码来源:MyFragmentTabHost.java

示例8: ensureHierarchy

import android.widget.TabWidget; //导入方法依赖的package包/类
private void ensureHierarchy(Context context) {
    // If owner hasn't made its own view hierarchy, then as a convenience
    // we will construct a standard one here.
    if (findViewById(android.R.id.tabs) == null) {
        LinearLayout ll = new LinearLayout(context);
        ll.setOrientation(LinearLayout.VERTICAL);
        addView(ll, new FrameLayout.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT));

        TabWidget tw = new TabWidget(context);
        tw.setId(android.R.id.tabs);
        tw.setOrientation(TabWidget.HORIZONTAL);
        ll.addView(tw, new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT, 0));

        FrameLayout fl = new FrameLayout(context);
        fl.setId(android.R.id.tabcontent);
        ll.addView(fl, new LinearLayout.LayoutParams(0, 0, 0));

        mRealTabContent = fl = new FrameLayout(context);
        mRealTabContent.setId(mContainerId);
        ll.addView(fl, new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT, 0, 1));
    }
}
 
开发者ID:lizubing1992,项目名称:Li-MVPArms,代码行数:28,代码来源:FragmentTabHost.java

示例9: ensureHierarchy

import android.widget.TabWidget; //导入方法依赖的package包/类
private void ensureHierarchy(Context context) {
	// If owner hasn't made its own view hierarchy, then as a convenience
	// we will construct a standard one here.
	if (findViewById(android.R.id.tabs) == null) {
		LinearLayout ll = new LinearLayout(context);
		ll.setOrientation(LinearLayout.VERTICAL);
		addView(ll, new FrameLayout.LayoutParams(
				ViewGroup.LayoutParams.MATCH_PARENT,
				ViewGroup.LayoutParams.MATCH_PARENT));

		TabWidget tw = new TabWidget(context);
		tw.setId(android.R.id.tabs);
		tw.setOrientation(TabWidget.HORIZONTAL);
		ll.addView(tw, new LinearLayout.LayoutParams(
				ViewGroup.LayoutParams.MATCH_PARENT,
				ViewGroup.LayoutParams.WRAP_CONTENT, 0));

		FrameLayout fl = new FrameLayout(context);
		fl.setId(android.R.id.tabcontent);
		ll.addView(fl, new LinearLayout.LayoutParams(0, 0, 0));

		mRealTabContent = fl = new FrameLayout(context);
		mRealTabContent.setId(mContainerId);
		ll.addView(fl, new LinearLayout.LayoutParams(
				LinearLayout.LayoutParams.MATCH_PARENT, 0, 1));
	}
}
 
开发者ID:weijianfeng,项目名称:FragmentMixViewPager,代码行数:28,代码来源:BaseFragmentTabHost.java

示例10: initFragmentTabHost

import android.widget.TabWidget; //导入方法依赖的package包/类
private void initFragmentTabHost(Context context, AttributeSet attrs) {
    TypedArray a = context.obtainStyledAttributes(attrs,
            new int[] { android.R.attr.inflatedId }, 0, 0);
    mContainerId = a.getResourceId(0, 0);
    a.recycle();

    super.setOnTabChangedListener(this);

    // If owner hasn't made its own view hierarchy, then as a convenience
    // we will construct a standard one here.
    if (findViewById(android.R.id.tabs) == null) {
        LinearLayout ll = new LinearLayout(context);
        ll.setOrientation(LinearLayout.VERTICAL);
        addView(ll, new FrameLayout.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.FILL_PARENT));

        TabWidget tw = new TabWidget(context);
        tw.setId(android.R.id.tabs);
        tw.setOrientation(TabWidget.HORIZONTAL);
        tw.setDividerDrawable(null);//鍘绘帀浜嗗簳閮╰ab鍒嗗壊绾�
        ll.addView(tw, new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT, 0));

        FrameLayout fl = new FrameLayout(context);
        fl.setId(android.R.id.tabcontent);
        ll.addView(fl, new LinearLayout.LayoutParams(0, 0, 0));

        mRealTabContent = fl = new FrameLayout(context);
        mRealTabContent.setId(mContainerId);
        ll.addView(fl, new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.FILL_PARENT, 0, 1));
    }
}
 
开发者ID:leerduo,项目名称:travelinfo,代码行数:36,代码来源:BaseFragmentTabHost.java

示例11: initFragmentTabHost

import android.widget.TabWidget; //导入方法依赖的package包/类
private void initFragmentTabHost(Context context, AttributeSet attrs) {
    TypedArray a = context.obtainStyledAttributes(attrs,
            new int[] { android.R.attr.inflatedId }, 0, 0);
    mContainerId = a.getResourceId(0, 0);
    a.recycle();

    super.setOnTabChangedListener(this);

    // If owner hasn't made its own view hierarchy, then as a convenience
    // we will construct a standard one here.
    if (findViewById(android.R.id.tabs) == null) {
        LinearLayout ll = new LinearLayout(context);
        ll.setOrientation(LinearLayout.VERTICAL);
        addView(ll, new FrameLayout.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.FILL_PARENT));

        TabWidget tw = new TabWidget(context);
        tw.setId(android.R.id.tabs);
        tw.setOrientation(TabWidget.HORIZONTAL);
        ll.addView(tw, new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT, 0));

        FrameLayout fl = new FrameLayout(context);
        fl.setId(android.R.id.tabcontent);
        ll.addView(fl, new LinearLayout.LayoutParams(0, 0, 0));

        mRealTabContent = fl = new FrameLayout(context);
        mRealTabContent.setId(mContainerId);
        ll.addView(fl, new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.FILL_PARENT, 0, 1));
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:35,代码来源:FragmentTabHost.java


注:本文中的android.widget.TabWidget.setOrientation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。