package fanch.multijeu.findwords.widget;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;

import java.util.ArrayList;

abstract class CustomLinearLayout extends LinearLayout {

    protected ArrayList<View> mChildren = new ArrayList<View>();

    public CustomLinearLayout(Context context) {
        super(context);
    }

    public CustomLinearLayout(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }


    protected void add(View v)
    {
        addView(v);
        mChildren.add(v);
    }

    public void clear()
    {
        removeAllViews();
        mChildren.clear();
    }
}
