當前位置: 首頁>>代碼示例>>Java>>正文


Java PagerSlidingTabStrip.setVisibility方法代碼示例

本文整理匯總了Java中com.astuetz.PagerSlidingTabStrip.setVisibility方法的典型用法代碼示例。如果您正苦於以下問題:Java PagerSlidingTabStrip.setVisibility方法的具體用法?Java PagerSlidingTabStrip.setVisibility怎麽用?Java PagerSlidingTabStrip.setVisibility使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.astuetz.PagerSlidingTabStrip的用法示例。


在下文中一共展示了PagerSlidingTabStrip.setVisibility方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreateView

import com.astuetz.PagerSlidingTabStrip; //導入方法依賴的package包/類
@Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            View rootView = inflater.inflate(R.layout.fragment_a, container, false);
            pager = (ViewPager) rootView.findViewById(R.id.pager);
            myPagerAdapter = new MyPagerAdapter(getChildFragmentManager());
            pager.setAdapter(myPagerAdapter);
            final int parent_position = getArguments().getInt(ARG_SECTION_NUMBER);
            myPagerAdapter.setInfoList(siteList.get(parent_position).getInfo());
            myPagerAdapter.notifyDataSetChanged();
            // Bind the tabs to the ViewPager
            tabs = (PagerSlidingTabStrip) rootView.findViewById(R.id.tabs);
//            tabs.setShouldExpand(true);





            tabs.setViewPager(pager);
            if (myPagerAdapter.getCount() == 1) {
                tabs.setVisibility(View.GONE);
            }
            return rootView;
        }
 
開發者ID:zlisthq,項目名稱:zlist-android,代碼行數:25,代碼來源:MainActivity.java

示例2: onCreateView

import com.astuetz.PagerSlidingTabStrip; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.viewpager_with_tabs, container, false);

    if (MizLib.hasLollipop())
        ((ActionBarActivity) getActivity()).getSupportActionBar().setElevation(0);

    mViewPager = (ViewPager) v.findViewById(R.id.awesomepager);
    mViewPager.setPageMargin(MizLib.convertDpToPixels(getActivity(), 16));

    mTabs = (PagerSlidingTabStrip) v.findViewById(R.id.tabs);

    mViewPager.setAdapter(new PagerAdapter(getChildFragmentManager()));
    mTabs.setViewPager(mViewPager);
    mTabs.setVisibility(View.VISIBLE);

    // Work-around a bug that sometimes happens with the tabs
    mViewPager.setCurrentItem(0);

    if (MizLib.hasLollipop())
        mTabs.setElevation(1f);

    return v;
}
 
開發者ID:MizzleDK,項目名稱:Mizuu,代碼行數:25,代碼來源:MovieLibraryOverviewFragment.java

示例3: onCreateView

import com.astuetz.PagerSlidingTabStrip; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_category, container, false);
    mPagerSlidingTabStrip = (PagerSlidingTabStrip) rootView.findViewById(R.id.tab_fragment_category);
    mViewPager = (ViewPager) rootView.findViewById(R.id.viewpager_fragment_category);
    mProgressBar = (ProgressBar) rootView.findViewById(R.id.progress_bar_fragment_category);
    mProgressBar.setVisibility(View.VISIBLE);
    mPagerSlidingTabStrip.setVisibility(View.GONE);
    return rootView;
}
 
開發者ID:hoyin258,項目名稱:MisterWok,代碼行數:11,代碼來源:CategoryListFragment.java

示例4: onCreate

import com.astuetz.PagerSlidingTabStrip; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);

	MizuuApplication.setupTheme(this);

       if (MizLib.hasLollipop())
           getSupportActionBar().setElevation(0);

       mTmdbId = getIntent().getExtras().getString("tmdbId");
       mCollectionId = getIntent().getExtras().getString("collectionId");
       mToolbarColor = getIntent().getExtras().getInt(IntentKeys.TOOLBAR_COLOR);
	mTmdbApiKey = MizLib.getTmdbApiKey(this);

       mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
       mProgressBar.setVisibility(View.VISIBLE);

       mViewPager = (ViewPager) findViewById(R.id.awesomepager);
       mViewPager.setOffscreenPageLimit(2);
       mViewPager.setPageMargin(MizLib.convertDpToPixels(this, 16));

       mTabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
       mTabs.setVisibility(View.GONE);

	if (savedInstanceState != null) {
           mJson = savedInstanceState.getString("json", "");
           mBaseUrl = savedInstanceState.getString("baseUrl");
           mCollection = savedInstanceState.getString("collection");
		setupActionBarStuff();

           mViewPager.setCurrentItem(savedInstanceState.getInt("tab", 0));
	} else {
		new MovieLoader(getApplicationContext()).execute(mTmdbId, mCollectionId);
	}
}
 
開發者ID:MizzleDK,項目名稱:Mizuu,代碼行數:36,代碼來源:MovieCoverFanartBrowser.java

示例5: onCreate

import com.astuetz.PagerSlidingTabStrip; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);

       MizuuApplication.setupTheme(this);

       if (MizLib.hasLollipop())
           getSupportActionBar().setElevation(0);
       getSupportActionBar().setDisplayHomeAsUpEnabled(true);

	tvdbId = getIntent().getExtras().getString("id");
       mToolbarColor = getIntent().getExtras().getInt(IntentKeys.TOOLBAR_COLOR);

       mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
       mProgressBar.setVisibility(View.VISIBLE);

       mViewPager = (ViewPager) findViewById(R.id.awesomepager);
       mViewPager.setOffscreenPageLimit(2);
       mViewPager.setPageMargin(MizLib.convertDpToPixels(this, 16));

       mTabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
       mTabs.setVisibility(View.GONE);

       setupActionBarStuff();

	if (savedInstanceState != null) {
           mViewPager.setCurrentItem(savedInstanceState.getInt("tab", 0));
	}
}
 
開發者ID:MizzleDK,項目名稱:Mizuu,代碼行數:30,代碼來源:ShowCoverFanartBrowser.java


注:本文中的com.astuetz.PagerSlidingTabStrip.setVisibility方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。