Skip to content

Commit

Permalink
Sizing complete for LTR languages
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Cleinman committed Aug 16, 2018
1 parent 037e752 commit f935840
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ private void onDealText(){
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int height = mVerticalPadding * 2 + (int) fontH;
int width = mHorizontalPadding * 2 + (int) fontW + (isEnableCross() ? height : 0);
mCrossAreaWidth = Math.min(Math.max(mCrossAreaWidth, height), width);
setMeasuredDimension(width, height);
}
Expand Down Expand Up @@ -245,7 +244,7 @@ protected void onDraw(Canvas canvas) {
}
} else {
canvas.drawText(mAbstractText,
(isEnableCross() ? getWidth() - getHeight() : getWidth()) / 2 - fontW / 2,
(isEnableCross() ? getWidth() - getHeight() : getWidth()) / 2 - fontW / 2 + (isEnableImage() ? getHeight() / 2 : 0),
getHeight() / 2 + fontH / 2 - bdDistance, mPaint);
}

Expand Down

0 comments on commit f935840

Please sign in to comment.