I’m currently using a Viewpager with 3 fragment. I would like to know if I can change the width of the first fragment.
In fact , I try this do to something like the category menu in the android play store when you watching it with tablet, it looks like a fragment but its not taking all the space when swiping to it so you still see the fragment next to it (i don’t know if i’m clear). I was wondering if I could simply do that by changing the width of the first fragment from MATCH_PARENT to a fixed value, i don’t even know if the result of this could be nice.
i tried setLayoutParams() , set it in the xml , nothing seems to work. the fragment still match parent.
With ViewPager, it is not supported. You have to write your own ViewGroup class, or you might try something as i answered in this question.