Java 类android.support.v7.widget.LinearLayoutCompat.LayoutParams 实例源码

项目:boohee_v5.6    文件:ScrollingTabContainerView.java   
private void performCollapse() {
    if (!isCollapsed()) {
        if (this.mTabSpinner == null) {
            this.mTabSpinner = createSpinner();
        }
        removeView(this.mTabLayout);
        addView(this.mTabSpinner, new ViewGroup.LayoutParams(-2, -1));
        if (this.mTabSpinner.getAdapter() == null) {
            this.mTabSpinner.setAdapter(new TabAdapter());
        }
        if (this.mTabSelector != null) {
            removeCallbacks(this.mTabSelector);
            this.mTabSelector = null;
        }
        this.mTabSpinner.setSelection(this.mSelectedTabIndex);
    }
}
项目:shengyiplus-android    文件:TableActivity.java   
private void checkInterfaceOrientation(Configuration config) {
        Boolean isLandscape = (config.orientation == Configuration.ORIENTATION_LANDSCAPE);

        if (isLandscape) {
//            mAnimLoading.setVisibility(View.VISIBLE);
            WindowManager.LayoutParams lp = getWindow().getAttributes();
            lp.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
            getWindow().setAttributes(lp);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
//            new LoadReportData().execute();
        } else {
            WindowManager.LayoutParams attr = getWindow().getAttributes();
            attr.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
            getWindow().setAttributes(attr);
            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
        }
    }
项目:boohee_v5.6    文件:ScrollingTabContainerView.java   
public ScrollingTabContainerView(Context context) {
    super(context);
    setHorizontalScrollBarEnabled(false);
    ActionBarPolicy abp = ActionBarPolicy.get(context);
    setContentHeight(abp.getTabContainerHeight());
    this.mStackedTabMaxWidth = abp.getStackedTabMaxWidth();
    this.mTabLayout = createTabLayout();
    addView(this.mTabLayout, new ViewGroup.LayoutParams(-2, -1));
}
项目:boohee_v5.6    文件:ScrollingTabContainerView.java   
private boolean performExpand() {
    if (isCollapsed()) {
        removeView(this.mTabSpinner);
        addView(this.mTabLayout, new ViewGroup.LayoutParams(-2, -1));
        setTabSelected(this.mTabSpinner.getSelectedItemPosition());
    }
    return false;
}
项目:boohee_v5.6    文件:ScrollingTabContainerView.java   
private LinearLayoutCompat createTabLayout() {
    LinearLayoutCompat tabLayout = new LinearLayoutCompat(getContext(), null, R.attr.actionBarTabBarStyle);
    tabLayout.setMeasureWithLargestChildEnabled(true);
    tabLayout.setGravity(17);
    tabLayout.setLayoutParams(new LayoutParams(-2, -1));
    return tabLayout;
}
项目:boohee_v5.6    文件:ScrollingTabContainerView.java   
private TabView createTabView(Tab tab, boolean forAdapter) {
    TabView tabView = new TabView(getContext(), tab, forAdapter);
    if (forAdapter) {
        tabView.setBackgroundDrawable(null);
        tabView.setLayoutParams(new AbsListView.LayoutParams(-1, this.mContentHeight));
    } else {
        tabView.setFocusable(true);
        if (this.mTabClickListener == null) {
            this.mTabClickListener = new TabClickListener();
        }
        tabView.setOnClickListener(this.mTabClickListener);
    }
    return tabView;
}
项目:boohee_v5.6    文件:ScrollingTabContainerView.java   
public void addTab(Tab tab, boolean setSelected) {
    TabView tabView = createTabView(tab, false);
    this.mTabLayout.addView(tabView, new LayoutParams(0, -1, 1.0f));
    if (this.mTabSpinner != null) {
        ((TabAdapter) this.mTabSpinner.getAdapter()).notifyDataSetChanged();
    }
    if (setSelected) {
        tabView.setSelected(true);
    }
    if (this.mAllowCollapse) {
        requestLayout();
    }
}
项目:boohee_v5.6    文件:ScrollingTabContainerView.java   
public void addTab(Tab tab, int position, boolean setSelected) {
    TabView tabView = createTabView(tab, false);
    this.mTabLayout.addView(tabView, position, new LayoutParams(0, -1, 1.0f));
    if (this.mTabSpinner != null) {
        ((TabAdapter) this.mTabSpinner.getAdapter()).notifyDataSetChanged();
    }
    if (setSelected) {
        tabView.setSelected(true);
    }
    if (this.mAllowCollapse) {
        requestLayout();
    }
}
项目:FMTech    文件:ScrollingTabContainerView.java   
private boolean performExpand()
{
  if (!isCollapsed()) {
    return false;
  }
  removeView(this.mTabSpinner);
  addView(this.mTabLayout, new ViewGroup.LayoutParams(-2, -1));
  setTabSelected(this.mTabSpinner.getSelectedItemPosition());
  return false;
}
项目:boohee_v5.6    文件:ScrollingTabContainerView.java   
private Spinner createSpinner() {
    Spinner spinner = new AppCompatSpinner(getContext(), null, R.attr.actionDropDownStyle);
    spinner.setLayoutParams(new LayoutParams(-2, -1));
    spinner.setOnItemSelectedListener(this);
    return spinner;
}