Code example for ViewPager

0
import android.view.SurfaceView; 
import android.view.View; 
 
public class MapAwarePager extends ViewPager { 
  public MapAwarePager(Context context, AttributeSet attrs) { 
    super(context, attrs); 
  } 
 
  @Override 
  protected boolean canScroll(View v, boolean checkV, int dx, int x, 
                              int y) { 
    if (v instanceof SurfaceView || v instanceof PagerTabStrip) { 
      return(true); 
    } 
     
    return(super.canScroll(v, checkV, dx, x, y)); 
  } 
} 
Connect your IDE to all the code out there  Get Codota for Java