Skip to content

Commit 67878d9

Browse files
author
hongyangAndroid
committed
fix padding
1 parent cc4b969 commit 67878d9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

autolayout/src/main/java/com/zhy/autolayout/AutoLayoutHelper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ private void supportPadding(View view, AutoLayoutInfo info)
128128

129129
if (info.paddingTop != 0)
130130
{
131-
top = (int) (info.paddingLeft * 1.0f / mDesignHeight * mAvailaleHegiht);
131+
top = (int) (info.paddingTop * 1.0f / mDesignHeight * mAvailaleHegiht);
132132
}
133133

134134
if (info.paddingRight != 0)
135135
{
136-
right = (int) (info.paddingRight * 1.0f / mDesignHeight * mAvailaleHegiht);
136+
right = (int) (info.paddingRight * 1.0f / mDesignWidth * mAvailableWidth);
137137
}
138138

139139
if (info.paddingBottom != 0)
@@ -265,7 +265,6 @@ private static boolean isTextSizeBaseWidth(Context context, AttributeSet attrs)
265265
{
266266
TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.AutoLayout_Layout);
267267
boolean res = array.getBoolean(R.styleable.AutoLayout_Layout_layout_auto_textSizeBaseWidth, false);
268-
L.e("isTextSizeBaseWidth = " + res);
269268
array.recycle();
270269
return res;
271270
}

0 commit comments

Comments
 (0)