MaterialViewPager icon indicating copy to clipboard operation
MaterialViewPager copied to clipboard

MaterialViewPager inside a fragment

Open nguyenduythuc opened this issue 8 years ago • 6 comments

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 13020577_795598190585072_1141761599_n

nguyenduythuc avatar Apr 13 '16 11:04 nguyenduythuc

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));

bloderxd avatar Apr 14 '16 00:04 bloderxd

Thanks for your help, but my problem is viewpager. I want my viewpager look like this 12969227_795945883883636_1626642390_n

nguyenduythuc avatar Apr 14 '16 02:04 nguyenduythuc

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.

bloderxd avatar Apr 14 '16 03:04 bloderxd

I have same issue. I tried to register fragment that doesn't include recycler view with FragmentPagerAdapter..

oesni avatar May 02 '16 17:05 oesni

try with android:fitsSystemWindows="true" on your layout ?

florent37 avatar May 27 '16 12:05 florent37

Could any one post the code on how to add the viewPager in a fragment

smidaharoun avatar Sep 28 '16 20:09 smidaharoun