本文整理汇总了Java中com.astuetz.viewpager.extensions.PagerSlidingTabStrip类的典型用法代码示例。如果您正苦于以下问题:Java PagerSlidingTabStrip类的具体用法?Java PagerSlidingTabStrip怎么用?Java PagerSlidingTabStrip使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PagerSlidingTabStrip类属于com.astuetz.viewpager.extensions包,在下文中一共展示了PagerSlidingTabStrip类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onProfileDataAvailable
import com.astuetz.viewpager.extensions.PagerSlidingTabStrip; //导入依赖的package包/类
private void onProfileDataAvailable() {
Log.d(TAG, "onProfileDataAvailable");
mFactory = new ProfileFieldViewFactory(getActivity(), mMode, mCurrentPersona, mContainer);
// Populate field list
mPagerAdapter = new ProfilePagerAdapter(getActivity(), getChildFragmentManager(), mMode);
mViewPager = (ViewPager) getView().findViewById(R.id.profileedit_pager);
mViewPager.setAdapter(mPagerAdapter);
mViewPager.setOffscreenPageLimit(2);
PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) getView().findViewById(R.id.profileedit_tabs);
tabs.setViewPager(mViewPager);
showPicture(mContainer.getFieldValue(ProfileField.PHOTO));
// Refresh field fragments
mPagerAdapter.onRefresh();
}
开发者ID:deib-polimi,项目名称:SPF,代码行数:20,代码来源:ProfileFragment.java
示例2: onActivityCreated
import com.astuetz.viewpager.extensions.PagerSlidingTabStrip; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
ContactsPagerAdapter pagerAdapter = new ContactsPagerAdapter(getChildFragmentManager(), getActivity());
ViewPager viewPager = (ViewPager) getView().findViewById(R.id.contacts_pager);
viewPager.setAdapter(pagerAdapter);
viewPager.setOffscreenPageLimit(2);
PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) getView().findViewById(R.id.contacts_tabs);
tabs.setViewPager(viewPager);
}
开发者ID:deib-polimi,项目名称:SPF,代码行数:14,代码来源:ContactsFragment.java
示例3: onCreate
import com.astuetz.viewpager.extensions.PagerSlidingTabStrip; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_app_detail);
if (savedInstanceState == null) {
mAppAuth = getIntent().getParcelableExtra(APP_AUTH_KEY);
} else {
mAppAuth = savedInstanceState.getParcelable(APP_AUTH_KEY);
}
if (mAppAuth == null) {
throw new IllegalStateException("App auth not found");
}
Drawable icon;
try {
icon = getPackageManager().getApplicationIcon(mAppAuth.getAppIdentifier());
} catch (NameNotFoundException e) {
Log.w(TAG, "Application identifier " + mAppAuth.getAppIdentifier() + " is not valid", e);
return;
}
((TextView) findViewById(R.id.app_name_view)).setText(mAppAuth.getAppName());
((TextView) findViewById(R.id.app_identifier_view)).setText(mAppAuth.getAppIdentifier());
((ImageView) findViewById(R.id.app_icon_view)).setBackground(icon);
mSectionsPagerAdapter = new SectionsPagerAdapter(this, mAppAuth, getFragmentManager());
mViewPager = (ViewPager) findViewById(R.id.app_detail_pager);
mViewPager.setAdapter(mSectionsPagerAdapter);
PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) findViewById(R.id.app_detail_tabs);
tabs.setViewPager(mViewPager);
getActionBar().setHomeButtonEnabled(true);
getActionBar().setDisplayHomeAsUpEnabled(true);
}
开发者ID:deib-polimi,项目名称:SPF,代码行数:38,代码来源:AppDetailActivity.java
示例4: onCreate
import com.astuetz.viewpager.extensions.PagerSlidingTabStrip; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
appContext = getApplicationContext();
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
try {
setSupportActionBar(toolbar);
} catch (Throwable e) {
// Bug auf Samsung- und Wiko-Geräten
// https://code.google.com/p/android/issues/detail?id=78377
}
settings = PreferenceManager
.getDefaultSharedPreferences(getApplicationContext());
if (!settings.contains("selected_school")) {
if (BuildConfig.FIXED_SCHOOL == null) {
Intent intent = new Intent(this, SelectSchoolActivity.class);
startActivity(intent);
finish();
} else {
settings.edit().putString("selected_school", BuildConfig.FIXED_SCHOOL).commit();
}
}
if (!isTablet()) {
vertretungFragment = new VertretungFragment();
nachrichtenFragment = new NachrichtenFragment();
addTab("Vertretungsplan", vertretungFragment);
addTab("Nachrichten", nachrichtenFragment);
tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
tabs.setViewPager(mViewPager);
tabs.setOnPageChangeListener(adapter);
} else {
vertretungFragment = (VertretungFragment) getSupportFragmentManager()
.findFragmentById(R.id.vertretung_fragment);
nachrichtenFragment = (NachrichtenFragment) getSupportFragmentManager()
.findFragmentById(R.id.nachrichten_fragment);
}
content = findViewById(R.id.content);
pBar = (ProgressBar) findViewById(R.id.progressBar);
// Launch license dialog
showDialogs();
if (savedInstanceState == null) {
if (gcmRegistered) {
new GetVertretungsplanTask().execute();
}
created = true;
} else {
Log.d("vertretungsplan", "load");
vertretungsplan = new Gson().fromJson(
savedInstanceState.getString("vertretungsplan"),
Vertretungsplan.class);
if (vertretungsplan != null)
setVertretungsplan(vertretungsplan);
}
FontUtils.setRobotoFont(this, findViewById(android.R.id.content));
}
开发者ID:johan12345,项目名称:vertretungsplan,代码行数:64,代码来源:StartActivity.java
示例5: findViews
import com.astuetz.viewpager.extensions.PagerSlidingTabStrip; //导入依赖的package包/类
public void findViews() {
mSetting = (View) findViewById(R.id.setting);
mTabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
mPager = (ViewPager) findViewById(R.id.pager);
}
开发者ID:xiaomi-sa,项目名称:alertsystem,代码行数:6,代码来源:MainActivity.java
示例6: onCreate
import com.astuetz.viewpager.extensions.PagerSlidingTabStrip; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
appContext = getApplicationContext();
settings = PreferenceManager
.getDefaultSharedPreferences(getApplicationContext());
if (!settings.contains("selected_school")) {
settings.edit().putString("selected_school", "Schleswig_Lornsenschule").commit();
}
vertretungFragment = new VertretungFragment();
nachrichtenFragment = new NachrichtenFragment();
addTab("Vertretungsplan", vertretungFragment);
addTab("Nachrichten", nachrichtenFragment);
tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
tabs.setViewPager(mViewPager);
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
getResources().getConfiguration();
if (metrics.widthPixels / (metrics.densityDpi / 160f) >= 800
&& getResources().getConfiguration().orientation == android.content.res.Configuration.ORIENTATION_LANDSCAPE) {
tabs.setVisibility(View.GONE);
}
tabs.setOnPageChangeListener(adapter);
tabs.setIndicatorColor(Color.rgb(51, 139, 255));
// Launch license dialog
showDialogs();
if (savedInstanceState == null) {
if (settings.getString("regId", null) != null)
new GetVertretungsplanTask().execute();
else {
setProgress(true);
// wait for GCM registration
registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
unregisterReceiver(this);
new GetVertretungsplanTask().execute();
}
}, new IntentFilter("com.johan.vertretungsplan.registered"));
}
} else {
Log.d("vertretungsplan", "load");
vertretungsplan = new Gson().fromJson(
savedInstanceState.getString("vertretungsplan"),
Vertretungsplan.class);
}
}
开发者ID:johan12345,项目名称:ls-vertretungsplan,代码行数:55,代码来源:StartActivity.java
注:本文中的com.astuetz.viewpager.extensions.PagerSlidingTabStrip类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论