@@ -20,6 +20,7 @@ class FlipTab : FrameLayout {
2020 constructor (context: Context , attrs: AttributeSet ? ) : super (context, attrs) {
2121 initialize(attrs)
2222 }
23+
2324 constructor (context: Context , attrs: AttributeSet ? , defStyleAttr: Int ) : super (
2425 context,
2526 attrs,
@@ -103,13 +104,13 @@ class FlipTab : FrameLayout {
103104 WOBBLE_RETURN_ANIMATION_DURATION
104105 )
105106 wobbleAngle = getFloat(R .styleable.FlipTab_wobbleAngle , WOBBLE_ANGLE )
106- if (hasValue(R .styleable.FlipTab_overallColor )) {
107+ if (hasValue(R .styleable.FlipTab_overallColor )) {
107108 setOverallColor(getColor(R .styleable.FlipTab_overallColor , OVERALL_COLOR ))
108109 } else {
109110 setTextColor(getColor(R .styleable.FlipTab_textColor , OVERALL_COLOR ))
110111 setHighlightColor(getColor(R .styleable.FlipTab_highlightColor , OVERALL_COLOR ))
111112 }
112- if (typedArray.getInt(R .styleable.FlipTab_startingTab , 0 )== 1 ) {
113+ if (typedArray.getInt(R .styleable.FlipTab_startingTab , 0 ) == 1 ) {
113114 isLeftSelected = false
114115 tab_selected_container.rotationY = 180f
115116 tab_selected.background = rightSelectedDrawable
@@ -120,6 +121,9 @@ class FlipTab : FrameLayout {
120121 tab_selected.background = leftSelectedDrawable
121122 tab_selected.scaleX = 1f
122123 }
124+ if (typedArray.getBoolean(R .styleable.FlipTab_removeDefaultPadding , false )) {
125+ base_fliptab_container.setPadding(0 , 0 , 0 , 0 )
126+ }
123127 setLeftTabText(getString(R .styleable.FlipTab_leftTabText ) ? : " Left tab" )
124128 setRightTabText(getString(R .styleable.FlipTab_rightTabText ) ? : " Right tab" )
125129 }
0 commit comments