Skip to content

Commit 00575df

Browse files
committed
Merge pull request #3 from songzhw/master
Plenty of frames are over 16ms. Fix it.
2 parents aec1a02 + df4db5c commit 00575df

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tagcloudlib/src/main/java/com/moxun/tagcloudlib/view/TagCloudView.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public class TagCloudView extends ViewGroup implements Runnable, TagsAdapter.OnD
5454
public static final int MODE_DECELERATE = 1;
5555
public static final int MODE_UNIFORM = 2;
5656
public int mode;
57+
private int left, right, top, bottom;
5758

5859
private MarginLayoutParams layoutParams;
5960
private int minSize;
@@ -216,11 +217,16 @@ protected void onDetachedFromWindow() {
216217
}
217218

218219
private void updateChild() {
219-
requestLayout();
220+
onLayout(false, left,top,right,bottom);
220221
}
221222

222223
@Override
223224
protected void onLayout(boolean changed, int l, int t, int r, int b) {
225+
left = l;
226+
right = r;
227+
top = t;
228+
bottom = b;
229+
224230
for (int i = 0; i < getChildCount(); i++) {
225231
View child = getChildAt(i);
226232
if (child.getVisibility() != GONE) {

0 commit comments

Comments
 (0)