title: android expandablelistview does not expand or receive click events
body: <p>I can't for the life of me figure out why my ExpandableListView doesn't expand... I have used log statements in just about every click listener I can find for the ExpandableListView and it doesnt look like any of them get called. </p>
  
  <p>I know there are many posts on this topic but I have read through them all and tried many things and am having no luck, hopefully I'm missing some tiny error that will be easy to spot for someone else.</p>
  
  <p>Main Activity:</p>
  
  <pre><code>public class ForumListActivity extends Activity  {
  
      private static ArrayList&lt;Forum&gt; forumList;
      private static ArrayList&lt;ArrayList&lt;SubForum&gt;&gt; subForumList;
      private ExpandableListView forumListView;
      private ForumListAdapter forumListAdapter;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          this.setContentView(R.layout.main_page);
          this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
  
          forumListView = (ExpandableListView) this.findViewById(R.id.main_page_forum_list);
  
          forumList = new ArrayList&lt;Forum&gt;();
          subForumList = new ArrayList&lt;ArrayList&lt;SubForum&gt;&gt;();
          setUpForums(this);
  
          forumListAdapter = new ForumListAdapter(this, forumList, subForumList);
          forumListView.setAdapter(forumListAdapter);
  
          forumListView.setOnGroupExpandListener(new OnGroupExpandListener(){
              @Override
              public void onGroupExpand(int groupPosition) {
                  Log.d("onGroupExpand", "this works?");
                  for(int i=0; i&lt;forumListAdapter.getGroupCount(); i++) {
                      if(i != groupPosition) 
                          forumListView.collapseGroup(groupPosition);
                  }
              }
          });
  
          forumListView.setOnGroupClickListener(new OnGroupClickListener() {
              @Override
              public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
                  Log.d("onGroupClick:", "worked");
                  parent.expandGroup(groupPosition);
                  return true;
              }
          });
      }
  </code></pre>
  
  <p>Note: the method setUpForums() just takes system arrays and puts them into forumList and subForumList</p>
  
  <p>ListViewAdapter: </p>
  
  <pre><code>public class ForumListAdapter extends BaseExpandableListAdapter {
  
      private ArrayList&lt;Forum&gt; groups;
      private ArrayList&lt;ArrayList&lt;SubForum&gt;&gt; children;
      private Context ctx;
  
      public ForumListAdapter(Context ctx, ArrayList&lt;Forum&gt; groups, ArrayList&lt;ArrayList&lt;SubForum&gt;&gt; children) {
          this.ctx = ctx;
          this.groups = groups;
          this.children = children;
      }
  
  
  
      @Override
      public Object getChild(int groupPosition, int childPosition) {
          return children.get(groupPosition).get(childPosition);
      }
  
  
  
      @Override
      public long getChildId(int groupPosition, int childPosition) {
          return childPosition;
      }
  
  
  
      @Override
      public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
          if (convertView == null) {
              LayoutInflater inflater = LayoutInflater.from(ctx);
              convertView = inflater.inflate(R.layout.forum_list_child_item_row, null);
          }
  
          SubForum currentSubForum = children.get(groupPosition).get(childPosition);
          TextView name = (TextView)convertView.findViewById(R.id.child_row_forum_title);
          TextView desc = (TextView)convertView.findViewById(R.id.child_row_forum_description);
  
          if (name != null)
              name.setText(currentSubForum.getName());
  
          if (desc != null)
              desc.setText(currentSubForum.getDescription());
  
          convertView.setFocusableInTouchMode(true);
          return convertView;
      }
  
  
  
      @Override
      public int getChildrenCount(int groupPosition) {
          return children.get(groupPosition).size();
      }
  
  
  
      @Override
      public Object getGroup(int groupPosition) {
          return groups.get(groupPosition);
      }
  
  
  
      @Override
      public int getGroupCount() {
          return groups.size();
      }
  
  
  
      @Override
      public long getGroupId(int groupPosition) {
          return groupPosition;
      }
  
  
  
      @Override
      public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
          if (convertView == null)
          {
              LayoutInflater inflater = LayoutInflater.from(ctx);
              convertView = inflater.inflate(R.layout.forum_list_group_item_row, null);
          }
  
          Forum currentForum = (Forum) groups.get(groupPosition);
          TextView name = (TextView) convertView.findViewById(R.id.group_item_forum_title);
          //ImageView image = (ImageView) convertView.findViewById(R.id.group_item_expander_image);
  
          if(name != null)
              name.setText(currentForum.getName());           
  
          /*
          if(image != null) {
              int[][] group_state_sets = {{}, {android.R.attr.state_expanded}};
              image.setVisibility(View.VISIBLE);  
              int stateSetIndex = (isExpanded ? 1 : 0) ;  
              Drawable drawable = image.getDrawable();  
              drawable.setState(group_state_sets[stateSetIndex]);  
          }
          */
  
          return convertView;
      }
  
  
  
      @Override
      public boolean hasStableIds() {
          return true;
      }
  
  
  
      @Override
      public boolean isChildSelectable(int groupPosition, int childPosition) {
          return true;
      }
  
  
  }
  </code></pre>
  
  <p>Group Layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@drawable/turquoise_gradient"
      android:orientation="horizontal"
      android:paddingTop="6dip"
      android:paddingBottom="6dip"
      android:paddingLeft="6dip" &gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/turquoise_gradient"
          android:orientation="vertical"
          android:padding="2dip" &gt;
  
          &lt;TextView
              android:id="@+id/group_item_forum_title"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="center_vertical|left"
              android:gravity="left"
              android:paddingLeft="5dip"
              android:textColor="@color/white"
              android:textSize="16dip" /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;!--  
      &lt;LinearLayout 
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:orientation="vertical"
          android:gravity="center|right"&gt;
  
          &lt;ImageView
              android:id="@+id/group_item_expander_image"
              android:focusable="false"
              android:focusableInTouchMode="false"
              android:gravity="center"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:src="@drawable/collapse_down" /&gt;
  
  
      &lt;/LinearLayout&gt; --&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>child layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@drawable/turquoise_gradient"
      android:orientation="horizontal"
      android:paddingTop="6dip"
      android:paddingBottom="6dip"
      android:paddingLeft="6dip" &gt;
  
  
      &lt;LinearLayout 
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:padding="2dip"
          android:background="@drawable/turquoise_gradient" &gt;
  
          &lt;TextView
              android:id="@+id/child_row_forum_title"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:gravity="left"
              android:layout_gravity="center_vertical"
              android:paddingLeft="5dip"
              android:textColor="@color/white"
              android:maxLines="1"
              android:textSize="11dip"  /&gt;
  
           &lt;TextView
              android:id="@+id/child_row_forum_description"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:gravity="left"
              android:layout_gravity="center_vertical"
              android:paddingLeft="15dip"
              android:textColor="@color/white"
              android:maxLines="2"
              android:textSize="11dip"  /&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>main page layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@color/black"
      android:orientation="vertical" &gt;
  
      &lt;ExpandableListView
          android:id="@+id/main_page_forum_list"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:background="@color/black"
          android:divider="@color/black"
          android:dividerHeight="1dip"
          android:clickable="true" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Any help you can provide is greatly appreciated!</p>