Skip to content

Commit

Permalink
1. 【Fix】SuperTextView will not draw when width or height is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
FliggyAndroid committed Nov 13, 2019
1 parent f62dab3 commit 9f7b46a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public void invalidateDrawable(Drawable drawable) {

@Override
protected void onDraw(Canvas canvas) {
if (getVisibility() != VISIBLE || !isAttachedToWindow() || getWidth() < 0 || getHeight() < 0)
if (getVisibility() != VISIBLE || !isAttachedToWindow() || getWidth() <= 0 || getHeight() <= 0)
return;
long startDrawTime = System.currentTimeMillis();
Tracker.notifyEvent(tracker, TimeEvent.create(Event.OnDrawStart, startDrawTime));
Expand Down

0 comments on commit 9f7b46a

Please sign in to comment.