Skip to content

Commit

Permalink
Merge pull request #3 from songzhw/master
Browse files Browse the repository at this point in the history
Plenty of frames are over 16ms. Fix it.
  • Loading branch information
misakuo committed Jan 27, 2016
2 parents aec1a02 + df4db5c commit 00575df
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class TagCloudView extends ViewGroup implements Runnable, TagsAdapter.OnD
public static final int MODE_DECELERATE = 1;
public static final int MODE_UNIFORM = 2;
public int mode;
private int left, right, top, bottom;

private MarginLayoutParams layoutParams;
private int minSize;
Expand Down Expand Up @@ -216,11 +217,16 @@ protected void onDetachedFromWindow() {
}

private void updateChild() {
requestLayout();
onLayout(false, left,top,right,bottom);
}

@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
left = l;
right = r;
top = t;
bottom = b;

for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
if (child.getVisibility() != GONE) {
Expand Down

0 comments on commit 00575df

Please sign in to comment.