MaterialViewPager
MaterialViewPager copied to clipboard
MaterialViewPager inside a fragment
I put MaterialViewPager inside a fragment and i have an issue. The viewpager, it's cover my tabview and action bar. Anyone help me! Thanks
Try to see where you changed system bar transparency, if you don't find you can set in your activity a color to it, like -
Window window = activity.getWindow();
//clear FLAG_TRANSLUCENT_STATUS flag:
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
// add FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS flag to the window
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
// finally change the color
window.setStatusBarColor(activity.getResources().getColor(R.color.my_statusbar_color));
Thanks for your help, but my problem is viewpager. I want my viewpager look like this
Ok, I did an example with this lib, maybe can help you fix this problem - https://github.com/bloder/megan-fox-layout
Check how you are setting material adapter.
I have same issue. I tried to register fragment that doesn't include recycler view with FragmentPagerAdapter..
try with android:fitsSystemWindows="true"
on your layout ?
Could any one post the code on how to add the viewPager in a fragment