// Path: app/src/main/java/in/sahildave/gazetti/welcomescreen/WelcomeScreenExpListAdapter.java
// public interface CheckBoxInterface {
//     void checkBoxClicked(boolean isChecked);
// }


import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.OnGroupClickListener;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import in.sahildave.gazetti.R;
import in.sahildave.gazetti.welcomescreen.WelcomeScreenExpListAdapter.CheckBoxInterface;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
        });

        prepareListData();
        expListAdapter = new WelcomeScreenExpListAdapter(getActivity(), listDataHeader, listDataChild, checkBoxInterface);
        expListAdapter.setExpList(expListView);
        expListView.setAdapter(expListAdapter);

        expListView.setOnGroupClickListener(new OnGroupClickListener() {

            @Override
            public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
//                Log.d(LOG_TAG, "Top Layer Hidden ? " + topLayerHidden);
                if (topLayer.getVisibility()==View.VISIBLE) {
                    LayoutParams originalParams = (LayoutParams) bottomLayer.getLayoutParams();
                    originalBottomMargin = originalParams.bottomMargin;

                    LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
                    params.setMargins(0, 0, 0, 0);
                    bottomLayer.setLayoutParams(params);

                    topLayer.setVisibility(View.GONE);
                    topLayerHidden = true;
                }
                return false;
            }
        });

        return rootView;
    }

// Path: app/src/main/java/in/sahildave/gazetti/welcomescreen/WelcomeScreenExpListAdapter.java
// public interface CheckBoxInterface {
//     void checkBoxClicked(boolean isChecked);
// }


// Path: app/src/main/java/in/sahildave/gazetti/welcomescreen/WelcomeScreenFragmentExpList.java
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.OnGroupClickListener;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import in.sahildave.gazetti.R;
import in.sahildave.gazetti.welcomescreen.WelcomeScreenExpListAdapter.CheckBoxInterface;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

        });

        prepareListData();
        expListAdapter = new WelcomeScreenExpListAdapter(getActivity(), listDataHeader, listDataChild, checkBoxInterface);
        expListAdapter.setExpList(expListView);
        expListView.setAdapter(expListAdapter);

        expListView.setOnGroupClickListener(new OnGroupClickListener() {

            @Override
            public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
//                Log.d(LOG_TAG, "Top Layer Hidden ? " + topLayerHidden);
                if (topLayer.getVisibility()==View.VISIBLE) {
                    LayoutParams originalParams = (LayoutParams) bottomLayer.getLayoutParams();
                    originalBottomMargin = originalParams.bottomMargin;

                    LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
                    params.setMargins(0, 0, 0, 0);
                    bottomLayer.setLayoutParams(params);

                    topLayer.setVisibility(View.GONE);
                    topLayerHidden = true;
                }
                return false;
            }
        });

        return rootView;
    }

    CheckBoxInterface checkBoxInterface = new CheckBoxInterface() {