mPager = (ViewPager) findViewById(R.id.pager); //the UI pagermPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager()); mPager.setAdapter(mPagerAdapter); mPager.setPageTransformer(true, new RotateDownTransformer()); //set the animation
Trang Chủ
Android
PHP
Chuỗi
Dialog
Clipboard
Spinner
Auto Layout
ActionBar
Intent
Random
SQL
Admod
Version
TextView
Tabhost
Json
ListView
Time Picker
Calendar
Ham
FloatingActionMenu
Button
EditText
Activity
Custom Adapter
Xoay Màn Hình
Wifi & 3G
Lỗi
Fragment
Shape
SMS
Push
FireBase
CheckBox
Mảng
Facebook
Timer
Service
Text To Speech
Recycler View
Search This Blog
Showing posts with label Tablayout. Show all posts
Showing posts with label Tablayout. Show all posts
Tuesday, September 19, 2017
Gắn hiệu ứng chuyễn động cho pageView
Thursday, July 13, 2017
Sự kiện chọn vào Tablayout
tabLayout.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
@Override
public void onTabSelected(TabLayout.Tab tab) {
if(tab.getPosition()==1){
tabLayout.setTabTextColors(ContextCompat.getColor(getActivity(), R.color.unselected_tab),ContextCompat.getColor(getActivity(), R.color.tab_selection));
}else{
tabLayout.setTabTextColors(ContextCompat.getColor(getActivity(), R.color.unselected_tab),ContextCompat.getColor(getActivity(), R.color.white));
}
// same thing goes with other tabs too
// Just change your tab text on selected/deselected as above
}
@Override
public void onTabUnselected(TabLayout.Tab tab) {
tab.setCustomView(null);
}
@Override
public void onTabReselected(TabLayout.Tab tab) {
}
});
Subscribe to:
Posts (Atom)