title: How do I display a custom ExpandableListView?
body: <p>One of the pages of my app is an ExpandableListView of names that should drop down when clicked, and display more information. My code compiles but "setAdapter()" shown below does not display anything. The parent view isn't even displaying, all I see is a blank page.</p>
  
  <pre><code>            json = new JSONArray(result);
              setContentView(R.layout.activity_doctor_list);
              listView = (ExpandableListView) findViewById(R.id.listView);
              adapter = new ExpandableDoctorAdapter(Doctors.this, json, email, logPrefs);
  
              for(int i =0; i &lt; json.length(); i++) {
                  adapter.getGroupView(i, false, null, null);
                  System.out.println("Getting a doctor...");
              }
              listView.setAdapter((android.widget.ExpandableListAdapter) adapter);
  </code></pre>
  
  <p>Here is the "getGroupView()" function being called above. I know adapter.getView(...) is being called for every list item, but for some reason setAdapter() displays nothing. </p>
  
  <pre><code>public View getGroupView(int position, boolean isExpanded, View convertView, ViewGroup parent) {
      int id = -1;
      String str_id = null;
      if (convertView == null) {
          convertView = LayoutInflater.from(context).inflate(R.layout.doctor_item, parent, false);
      }
      JSONObject jsonObject = null;
      TextView docName = (TextView) convertView.findViewById(R.id.name);
      TextView docDistance = (TextView) convertView.findViewById(R.id.distance);
      ImageButton form = (ImageButton) convertView.findViewById(R.id.form);
      ImageButton bio = (ImageButton) convertView.findViewById(R.id.profile);
  
      try {
          jsonObject = (JSONObject) content.get(position);
          docName.setText(jsonObject.getString("FirstName") + " " + jsonObject.getString("LastName"));
          docDistance.setText(jsonObject.getString("Distance") + " miles away");
          str_id = jsonObject.getString("DoctorId")  ;
          id = parseInt(str_id);
          convertView.setId(id);
      } catch (JSONException e) {
          e.printStackTrace();
      }
  
      final String finalStr_id = str_id;
      form.setOnClickListener(new View.OnClickListener() {
          Intent myIntent;
          public void onClick(View view) {
              if (username != null) {
                  myIntent = new Intent(context, Form.class);
              } else {
                  myIntent = new Intent(context, Login.class);
              }
              myIntent.putExtra("docId", finalStr_id);
              context.startActivity(myIntent);
          }
      });
  
      bio.setOnClickListener(new View.OnClickListener() {
          public void onClick(View view) {
              Intent myIntent = new Intent(context, Bio.class);
              myIntent.putExtra("docId", finalStr_id);
              context.startActivity(myIntent);
          }
      });
      System.out.print("Returning a doctor view...");
      return convertView;
  }
  </code></pre>
  
  <p>Am I misusing the getGroupView(...) function? I previously had this set up as just a normal listView and it worked with a similar code structure, but the switch to an expandable list view is causing nothing to display.</p>