I am just about to create Android application and I need to calculate left and right padding of ViewPager so I can show three fragment items in it, one to be centered and the other two to be from left and right side of the first one.
If I set some fixed values of padding it looks good on one device, but on the other I cannot see all three items, but only one OR if I set padding to be too big then my ViewPager overlap items. So I need to calculate it depending on screen size.
I have found this question but it does not solve my problem.
The arrangement of the fragments should be like on the picture enter image description here
Can you please help me to solve this problem?
thanks in advance