You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initially my FlowLayout is hidden, then I want to expand it using animation. The layout contains two lines of tags (buttons). The problem is I can't get actual height of FlowLayout with multiple lines of tags: it returns height (not sure) of single-line container. Verbose question.
Animation expand code:
v.measure(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
final int targetHeight = v.getMeasuredHeight();
v.getLayoutParams().height = 1;
v.setVisibility(View.VISIBLE);
Animation a = new Animation(){
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
v.getLayoutParams().height = interpolatedTime == 1
? ViewGroup.LayoutParams.WRAP_CONTENT
: (int)(targetHeight * interpolatedTime);
v.requestLayout();
}
@Override
public boolean willChangeBounds() {
return true;
}
};
The text was updated successfully, but these errors were encountered:
Initially my FlowLayout is hidden, then I want to expand it using animation. The layout contains two lines of tags (buttons). The problem is I can't get actual height of FlowLayout with multiple lines of tags: it returns height (not sure) of single-line container.
Verbose question.
Animation expand code:
The text was updated successfully, but these errors were encountered: