Skip to content

Commit 9f7b46a

Browse files
committed
1. 【Fix】SuperTextView will not draw when width or height is 0
1 parent f62dab3 commit 9f7b46a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/coorchice/library/SuperTextView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ public void invalidateDrawable(Drawable drawable) {
369369

370370
@Override
371371
protected void onDraw(Canvas canvas) {
372-
if (getVisibility() != VISIBLE || !isAttachedToWindow() || getWidth() < 0 || getHeight() < 0)
372+
if (getVisibility() != VISIBLE || !isAttachedToWindow() || getWidth() <= 0 || getHeight() <= 0)
373373
return;
374374
long startDrawTime = System.currentTimeMillis();
375375
Tracker.notifyEvent(tracker, TimeEvent.create(Event.OnDrawStart, startDrawTime));

0 commit comments

Comments
 (0)