package com.mindorks.test;

import android.os.Bundle;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;

import com.mindorks.butterknifelite.ButterKnifeLite;
import com.mindorks.butterknifelite.annotations.BindView;
import com.mindorks.placeholderview.ExpandablePlaceHolderView;
import com.mindorks.placeholderview.PlaceHolderView;
import com.mindorks.test.drawer.DrawerHeader;
import com.mindorks.test.drawer.DrawerMenuItem;
import com.mindorks.test.expandable.ChildItem;
import com.mindorks.test.expandable.ParentItem;
import com.mindorks.test.gallery.ImageTypeBig;
import com.mindorks.test.gallery.ImageTypeSmallPlaceHolder;

import java.util.ArrayList;
import java.util.List;


public class TestActivity extends AppCompatActivity {

    @BindView(R.id.toolbar)
    private Toolbar mToolbar;

    @BindView(R.id.expandableView)
    private ExpandablePlaceHolderView mExpandableView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
        ButterKnifeLite.bind(this);

        mExpandableView
                .addView(new ParentItem(this.getApplicationContext()))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ParentItem(this.getApplicationContext()))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ParentItem(this.getApplicationContext()))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ParentItem(this.getApplicationContext()))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ParentItem(this.getApplicationContext()))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ParentItem(this.getApplicationContext()))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ParentItem(this.getApplicationContext()))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ParentItem(this.getApplicationContext()))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ParentItem(this.getApplicationContext()))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView))
                .addView(new ChildItem(mExpandableView));
    }
}

@@ -40,115 +40,53 @@
 oid.
-os.Bundle;%0Aimport android.support.v4.widget.DrawerLayout;%0Aimport android.support.v7.app.ActionBarDrawerTogg
+content.res.Resources;%0Aimport android.os.Bund
 le;%0A
@@ -179,34 +179,8 @@
 bar;
-%0Aimport android.view.View;
 %0A%0Aim
@@ -284,24 +284,81 @@
 s.BindView;%0A
+import com.mindorks.butterknifelite.annotations.OnClick;%0A
 import com.m
@@ -432,387 +432,81 @@
 rks.
-placeholderview.PlaceHolderView;%0Aimport com.mindorks.test.drawer.DrawerHeader;%0Aimport com.mindorks.test.drawer.DrawerMenuItem;%0Aimport com.mindorks.test.expandable.ChildItem;%0Aimport com.mindorks.test.expandable.ParentItem;%0Aimport com.mindorks.test.gallery.ImageTypeBig;%0Aimport com.mindorks.test.gallery.ImageTypeSmallPlaceHolder;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List
+test.expandable.ChildItem;%0Aimport com.mindorks.test.expandable.ParentItem
 ;%0A%0A%0A
@@ -560,16 +560,43 @@
 vity %7B%0A%0A
+    ParentItem parentItem;%0A
     @Bin
@@ -645,17 +645,16 @@
 oolbar;%0A
-%0A
     @Bin
@@ -936,16 +936,84 @@
 this);%0A%0A
+        parentItem = new ParentItem(this.getApplicationContext());%0A%0A
         
@@ -1401,37 +1401,33 @@
        .addView(
-new P
+p
 arentItem(this.g
@@ -1423,38 +1423,8 @@
 Item
-(this.getApplicationContext())
 )%0A  
@@ -3748,11 +3748,875 @@
 );%0A    %7D
+%0A%0A//    @OnClick(R.id.collapse)%0A//    void onCollapse() %7B%0A//        try %7B%0A//            mExpandableView.collapse(0);%0A//        %7Dcatch (Resources.NotFoundException e)%7B%0A//            e.printStackTrace();%0A//        %7D%0A//    %7D%0A//%0A//    @OnClick(R.id.expand)%0A//    void onExpand() %7B%0A//        try %7B%0A//            mExpandableView.expand(0);%0A//        %7Dcatch (Resources.NotFoundException e)%7B%0A//            e.printStackTrace();%0A//        %7D%0A//    %7D%0A%0A    @OnClick(R.id.collapse)%0A    void onCollapse() %7B%0A        try %7B%0A            mExpandableView.collapse(parentItem);%0A        %7D catch (Resources.NotFoundException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @OnClick(R.id.expand)%0A    void onExpand() %7B%0A        try %7B%0A            mExpandableView.expand(parentItem);%0A        %7D catch (Resources.NotFoundException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D
 %0A%7D%0A

Add EPHV expand-collapse, optimize imports