fix View's paddingXXX

This commit is contained in:
houzh 2023-03-13 00:47:39 +00:00
parent 6a253605fd
commit 8de9536abe

View File

@ -263,8 +263,8 @@ View::View(Context*ctx,const AttributeSet&attrs){
leftPaddingDefined = true;
rightPaddingDefined = true;
}else{
int horz=attrs.getDimensionPixelSize("paddingHorizontal",0);
int vert=attrs.getDimensionPixelSize("paddingVertical",0);
int horz=attrs.getDimensionPixelSize("paddingHorizontal",-1);
int vert=attrs.getDimensionPixelSize("paddingVertical",-1);
if(horz>=0){
leftPadding = rightPadding = horz;
leftPaddingDefined = rightPaddingDefined = true;