package com.xtremelabs.robolectric.shadows;

import android.view.View;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.OnChildClickListener;
import com.xtremelabs.robolectric.internal.Implementation;
import com.xtremelabs.robolectric.internal.Implements;
import com.xtremelabs.robolectric.internal.RealObject;

@Implements(ExpandableListView.class)
public class ShadowExpandableListView extends ShadowListView {
    @RealObject private ExpandableListView mExpandable;
    private OnChildClickListener mChildClickListener;

    @Implementation
    @Override
    public boolean performItemClick(View view, int position, long id) {
        if (mChildClickListener != null) {
            mChildClickListener.onChildClick(mExpandable, null, 0, position, id);
            return true;
        }
        return false;
    }

    @Implementation
    public void setOnChildClickListener(OnChildClickListener clildListener) {
        mChildClickListener = clildListener;
    }
}
@@ -60,24 +60,69 @@
 .view.View;%0A
+import android.widget.ExpandableListAdapter;%0A
 import andro
@@ -147,24 +147,24 @@
 leListView;%0A
-
 import andro
@@ -595,17 +595,69 @@
 stener;%0A
+    %0A    private ExpandableListAdapter adapter;%0A    
 %0A
-
     @Imp
@@ -1037,24 +1037,24 @@
 Listener) %7B%0A
-
         mChi
@@ -1092,9 +1092,246 @@
 ;%0A    %7D%0A
+    %0A    @Implementation%0A    public void setAdapter(ExpandableListAdapter adapter) %7B%0A        this.adapter = adapter;%0A    %7D%0A    %0A    @Implementation%0A    public ExpandableListAdapter getExpandableListAdapter ()%7B%0A    %09return adapter;%0A    %7D%0A
 %7D

Improve ShadowExpandableListView