In Support Package, r4 you can use these methods:
setPageMargin(int marginPixels)
setPageMarginDrawable(Drawable)
setPageMarginDrawable(int)
in ViewPager class.
I don't know why this doesn't have equivalent in XML :-(
If you need use dip unit you can use this method:
public static int convertDip2Pixels(Context context, int dip) {
return (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, context.getResources().getDisplayMetrics());
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…