title: How to disable expanding for some items in BaseExpandableListAdapter
body: <p>I'd like to disable expandability for some items in the <a href="https://stackoverflow.com/a/15479026/2401535">ExpandableListView</a>.</p>
  
  <p>So far I know it can be done form <a href="https://stackoverflow.com/a/15479026/2401535">ExpandableListView</a> but I think it's not good to control what to show/why/where NOT from ListView - this task belongs to adapter and there I want to disable expandability.</p>
  
  <p>So how to do it from a class which extends <a href="http://developer.android.com/reference/android/widget/BaseExpandableListAdapter.html" rel="nofollow noreferrer">BaseExpandableListAdapter</a>?</p>
  
  <p>So far I've tried to set <code>convertView</code> visibility to <code>View.GONE</code> but it does not work (i.e. it shows some weird View, empty but not <code>View.GONE</code>)</p>
  
  <pre><code>@Override
  public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
      if (null == convertView) {
          convertView = inflater.inflate(R.layout.system_status_child, parent, false);
      }
  
      Item item = systemStatus.get(groupPosition);
  
      if(item.isStatusOk()){
          convertView.setVisibility(View.GONE);
      }
      else{
          convertView.setVisibility(View.VISIBLE);
          ((TextViewMuseo)convertView).setText(item.getChild_text());
      }
  
      return convertView;
  }
  </code></pre>
  
  <p><code>system_status_child.xml</code> looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/system_status_text"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:text="some text" /&gt;
  </code></pre>