David Neto's suggestion is good.
But: You don't need to set the Layout width and heigth of all other Views to to 0.
What you need to do:
- Set the Visibility of all other Views to
View.GONE
, which is much easier
If your ViewPager has "match_parent" properties for width and height, than thats it. If not, set them to "match_parent".