Skip to content

Commit

Permalink
universal padding logic
Browse files Browse the repository at this point in the history
  • Loading branch information
daimajia committed Aug 29, 2014
1 parent c53cead commit b1c94c6
Showing 1 changed file with 0 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,46 +178,12 @@ public PagerIndicator(Context context, AttributeSet attrs) {
setDefaultUnselectedIndicatorSize(mDefaultUnSelectedWidth,mDefaultUnSelectedHeight,Unit.Px);
setDefaultIndicatorColor(mDefaultSelectedColor, mDefaultUnSelectedColor);
setIndicatorVisibility(mVisibility);
// setDefaultSelectedPadding(mSelectedPadding_Left,mSelectedPadding_Top,mSelectedPadding_Right,mSelectedPadding_Bottom,Unit.Px);
// setDefaultUnSelectedPadding(mUnSelectedPadding_Left,mUnSelectedPadding_Top,mUnSelectedPadding_Right,mUnSelectedPadding_Bottom,Unit.Px);
attributes.recycle();
}

public enum Shape{
Oval,Rectangle
}
//
// public void setDefaultPadding(float left,float top, float right, float bottom,Unit unit){
// setDefaultSelectedPadding(left,top,right,bottom,unit);
// setDefaultUnSelectedPadding(left,top,right,bottom,unit);
// }
//
// public void setDefaultSelectedPadding(float left,float top, float right, float bottom,Unit unit){
// if(unit == Unit.DP){
// mSelectedLayerDrawable.setLayerInset(0,
// (int)pxFromDp(left),(int)pxFromDp(top),
// (int)pxFromDp(right),(int)pxFromDp(bottom));
// }else{
// mSelectedLayerDrawable.setLayerInset(0,
// (int)left,(int)top,
// (int)right,(int)bottom);
//
// }
// }
//
// public void setDefaultUnSelectedPadding(float left,float top, float right, float bottom, Unit unit){
// if(unit == Unit.DP){
// mUnSelectedLayerDrawable.setLayerInset(0,
// (int)pxFromDp(left),(int)pxFromDp(top),
// (int)pxFromDp(right),(int)pxFromDp(bottom));
//
// }else{
// mUnSelectedLayerDrawable.setLayerInset(0,
// (int)left,(int)top,
// (int)right,(int)bottom);
//
// }
// }

/**
* if you are using the default indicator, this method will help you to set the shape of
Expand Down Expand Up @@ -352,8 +318,6 @@ public void destroySelf(){
adapter.unregisterDataSetObserver(dataChangeObserver);
}
removeAllViews();
ShapeDrawable shapeDrawable;

}

/**
Expand Down

0 comments on commit b1c94c6

Please sign in to comment.