本文整理汇总了Java中com.astuetz.PagerSlidingTabStrip.setTextColor方法的典型用法代码示例。如果您正苦于以下问题:Java PagerSlidingTabStrip.setTextColor方法的具体用法?Java PagerSlidingTabStrip.setTextColor怎么用?Java PagerSlidingTabStrip.setTextColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.astuetz.PagerSlidingTabStrip
的用法示例。
在下文中一共展示了PagerSlidingTabStrip.setTextColor方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.pager_fragment, container, false);
ViewPager pager = (ViewPager) view.findViewById(R.id.pagerForList);
PagerAdapter pagerAdapter = new PagerAdapter(getChildFragmentManager());
pager.setAdapter(pagerAdapter);
pager.setOffscreenPageLimit(2);
tabs = (PagerSlidingTabStrip) view.findViewById(R.id.tabs_main);
tabs.setShouldExpand(true);
tabs.setBackgroundColor(getResources().getColor(R.color.brown));
tabs.setIndicatorColor(getResources().getColor(R.color.white));
tabs.setTextColor(getResources().getColor(R.color.black));
tabs.setIndicatorHeight(height);
tabs.setDividerColor(getResources().getColor(R.color.black));
tabs.setViewPager(pager);
// tabs.setTextSize(45);
return view;
}
示例2: onCreate
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
// Create the adapter that will return a fragment for each of the three
// primary sections of the activity.
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsPagerAdapter);
PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
tabs.setIndicatorColor(Color.parseColor("#33b5e5"));
tabs.setTextColor(Color.parseColor("#33b5e5"));
tabs.setViewPager(mViewPager);
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
// Start the server thread in the ServerThread.class and pass on the UUID for communication
// as well as the instance for this activity to access the ImageView
myServer = new ServerThread(mBluetoothAdapter, MY_UUID, HomeActivity.this);
myServer.start();
}
示例3: onCreateView
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_deck_builder, container, false);
ViewPager pager = (ViewPager)rootView.findViewById(R.id.deck_list_pager);
pager.setAdapter(new DeckBuilderPagerAdapter(
getActivity().getSupportFragmentManager(),
mDeck.getPlayerClass(),
mDeck.getId(),
getActivity()));
PagerSlidingTabStrip tabs =
(PagerSlidingTabStrip)rootView.findViewById(R.id.deck_builder_tab_strip);
tabs.setBackground(new ColorDrawable(Utility.getPrimaryColorForClass(
mDeck.getPlayerClass(), getResources())));
tabs.setTextColor(Color.WHITE);
tabs.setIndicatorColor(Color.WHITE);
tabs.setViewPager(pager);
return rootView;
}
示例4: onCreateView
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_home_card_list, container, false);
mViewPager = (ViewPager)rootView.findViewById(R.id.card_list_pager);
mPagerAdapter = new BrowsePagerAdapter(getActivity().getSupportFragmentManager());
mViewPager.setAdapter(mPagerAdapter);
mTabs =
(PagerSlidingTabStrip)rootView.findViewById(R.id.card_list_pager_title_strip);
mTabs.setViewPager(mViewPager);
mTabs.setOnPageChangeListener(pageChangeListener);
mTabs.setTextColor(Color.WHITE);
mTabs.setIndicatorColor(Color.WHITE);
return rootView;
}
示例5: showTabs
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
private void showTabs(ViewPager pager, View view) {
mViewPagerTabs = (PagerSlidingTabStrip) view.findViewById(R.id.tabs);
mViewPagerTabs.setTextColor(getResources().getColor(android.R.color.white));
mViewPagerTabs.setShouldExpand(expandTabs());
mViewPagerTabs.setViewPager(pager);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mViewPagerTabs.setTabBackground(android.R.attr.selectableItemBackground);
}
}
示例6: showTabs
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
private void showTabs(ViewPager pager) {
mViewPagerTabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
mViewPagerTabs.setTextColor(getResources().getColor(android.R.color.white));
mViewPagerTabs.setShouldExpand(expandTabs());
mViewPagerTabs.setViewPager(pager);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mViewPagerTabs.setTabBackground(android.R.attr.selectableItemBackground);
}
}
示例7: onCreate
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
SamplesNotification.startJob(this);
// Set up the action bar.
final ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayShowHomeEnabled(true);
actionBar.setLogo(R.mipmap.logo_action_bar);
actionBar.setDisplayUseLogoEnabled(true);
actionBar.setElevation(0);
// Create the adapter that will return a fragment for each of the three
// primary sections of the activity.
SectionsPagerAdapter mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsPagerAdapter);
// Bind the tabs to the ViewPager
PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
tabs.setViewPager(mViewPager);
tabs.setTextColor(getResources().getColor(R.color.white));
tabs.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
tabs.setIndicatorColor(getResources().getColor(R.color.white));
}
示例8: onCreate
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
this.getSupportActionBar().setElevation(0);
getWindow().setSharedElementExitTransition(new Slide());
getWindow().setSharedElementEnterTransition(new Slide());
tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
viewPager = (ViewPager) findViewById(R.id.pager);
viewPagerAdapter = new ContactsAdapter(this.getSupportFragmentManager(), this);
viewPager.setAdapter(viewPagerAdapter);
tabs.setShouldExpand(true);
tabs.setTextColor(getResources().getColor(R.color.text_primary));
tabs.setDividerColor(getResources().getColor(R.color.primary));
tabs.setIndicatorColorResource(R.color.text_primary);
tabs.setIndicatorHeight(7);
// Bind the tabs to the ViewPager
tabs.setViewPager(viewPager);
//Start in Contacts Fragment
viewPager.setCurrentItem(1);
// Listener for slide animation on searchable selected
setOnSearchableListener();
// Configure custom-searchable UI
// CustomSearchableInfo.setTransparencyColor(Color.parseColor("#0288D1"));
}
示例9: onCreate
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_pager_with_tabs);
Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar);
toolbar.setTitleTextColor(getResources().getColor(android.R.color.white));
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayShowHomeEnabled(true);
List<ViewPagerItem> viewPagerItems = null;
ViewPagerHandler handler = getViewPagerHandler();
if (handler != null && handler.getViewPagerItems() != null)
viewPagerItems = handler.getViewPagerItems();
if (viewPagerItems != null && viewPagerItems.size() > 0) {
ViewPager pager = (ViewPager) findViewById(R.id.viewpager);
pager.setAdapter(new ViewPagerWithTabsAdapter(this, getSupportFragmentManager(), viewPagerItems));
int defaultViewPagerItemSelectedPosition = defaultViewPagerItemSelectedPosition();
if (defaultViewPagerItemSelectedPosition >= 0 && defaultViewPagerItemSelectedPosition < viewPagerItems.size())
pager.setCurrentItem(defaultViewPagerItemSelectedPosition);
PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
tabs.setTextColor(getResources().getColor(android.R.color.white));
tabs.setViewPager(pager);
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
tabs.setTabBackground(android.R.attr.selectableItemBackground);
}
}
示例10: setupPager
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
private void setupPager(DataManager dataManager){
pager = (ViewPager)getActivity().findViewById(R.id.pager);
pager.setAdapter(new GraphAdapter (getChildFragmentManager(), dataManager));
PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) getActivity().findViewById(R.id.tabs);
tabs.setTextColor(getResources().getColor(R.color.white));
tabs.setBackgroundColor(getResources().getColor(R.color.app_primary));
tabs.setViewPager(pager);
}
示例11: onCreate
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_assignment);
//Define Toolbar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
//Configure Toolbar
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(false);
getSupportActionBar().setTitle(getIntent().getStringExtra(Constants.EXTRA_COURSETITLE));
int courseIndex = getIntent().getIntExtra(Constants.EXTRA_COURSEINDEX, 0);
dataManager = new DataManager(this);
courseID = getIntent().getStringExtra(Constants.EXTRA_COURSEID);
grades = dataManager.getClassGrades(courseID);
// Initialize the ViewPager and set an adapter
ViewPager pager = (ViewPager) findViewById(R.id.pager);
pager.setAdapter(new Adapter(getSupportFragmentManager()));
// Bind the tabs to the ViewPager
PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
tabs.setTextColor(getResources().getColor(R.color.white));
tabs.setBackgroundColor(getResources().getColor(R.color.app_primary));
tabs.setViewPager(pager);
}
示例12: onCreate
import com.astuetz.PagerSlidingTabStrip; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_schedules);
pColor = DB.patients().getActive(this).getColor();
setupToolbar(null, pColor);
setupStatusBar(pColor);
subscribeToEvents();
processIntent();
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
TextView title = ((TextView) findViewById(R.id.textView2));
title.setBackgroundColor(pColor);
title.setText(getString(mScheduleId != -1 ? R.string.title_edit_schedule_activity : R.string.title_create_schedule_activity));
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsPagerAdapter);
mViewPager.setOnPageChangeListener(this);
mViewPager.setOffscreenPageLimit(3);
tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
tabs.setOnPageChangeListener(this);
tabs.setAllCaps(true);
tabs.setShouldExpand(true);
tabs.setDividerPadding(3);
tabs.setDividerColor(getResources().getColor(R.color.white_50));
tabs.setDividerColor(getResources().getColor(R.color.transparent));
tabs.setIndicatorHeight(ScreenUtils.dpToPx(getResources(), 4));
tabs.setIndicatorColor(ScreenUtils.equivalentNoAlpha(pColor, 0.8f));
tabs.setTextColor(Color.parseColor("#222222"));
tabs.setUnderlineColor(ScreenUtils.equivalentNoAlpha(pColor, 0.5f));
tabs.setViewPager(mViewPager);
if (mSchedule != null) {
mViewPager.setCurrentItem(1);
}
findViewById(R.id.add_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
saveSchedule();
}
});
}