AAkira / ExpandableLayout

[Deprecated] An android library that brings the expandable layout with various animation. You can include optional contents and use everywhere.
Apache License 2.0
1.65k stars 325 forks source link

ExpandableRelativeLayout not work app:ael_expanded = false in child fragment #75

Open vishalpatel1327 opened 8 years ago

vishalpatel1327 commented 8 years ago

ExpandableRelativeLayout not work app:ael_expanded = false in child fragment version 1.5.1

to much issue in child fragemt but it work in activity great pls help

linermgn commented 8 years ago

Confirmed

julianfalcionelli commented 8 years ago

yes, and by setting visibility gone doesn't work.

By time i just collapse the view in the onCreateView method:

mExpandableLayout.post(new Runnable()
        {
            @Override
            public void run()
            {
                mExpandableLayout.collapse(-1, null);
            }
        });
intmainwjj commented 7 years ago
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    super.onMeasure(widthMeasureSpec, heightMeasureSpec);

    if (isCalculatedSize) return;

    final int measureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
    if (isVertical()) {
        int measuredHeight = getMeasuredHeight();

        super.onMeasure(widthMeasureSpec, measureSpec);
        layoutSize = getMeasuredHeight();

        setMeasuredDimension(getMeasuredWidth(), defaultExpanded ? measuredHeight : closePosition);
    } else {
        int measuredWidth = getMeasuredWidth();

        super.onMeasure(measureSpec, heightMeasureSpec);
        layoutSize = getMeasuredWidth();

        setMeasuredDimension(defaultExpanded ? measuredWidth : closePosition, getMeasuredHeight());
    }