本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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));
}
}