title: How to add different image for each group in expandable Listview
body: <p>In my Expandable Listview, have three groups. I want to add different three image for that group. i tried many codes, but not working. </p>
  
  <p>My code:</p>
  
  <p>Main Activity:</p>
  
  <pre><code>HashMap&lt;String, List&lt;String&gt;&gt; rightDrawerListDetail = getData();
  List&lt;String&gt; rightDrawerListTitle = new ArrayList&lt;String&gt;(rightDrawerListDetail.keySet());
     adapterR = new CustomExpandableListAdapter(this, rightDrawerListTitle,rightDrawerListDetail);
      mRightDrawerList.setAdapter(adapterR);
  
  
  private HashMap&lt;String, List&lt;String&gt;&gt; getData(){
  
      HashMap&lt;String, List&lt;String&gt;&gt; expandableListDetail = new HashMap&lt;String, List&lt;String&gt;&gt;();
      ArrayList&lt;String&gt; arrayList = mydb.getAllAddress();
  
      List asRider = new ArrayList();
      asRider.add("hello");
  
      List asRidee = new ArrayList();
      asRidee.add("hai");
  
      List recent = new ArrayList();
      recent.add("Success");
  
      expandableListDetail.put("As a Rider",asRider);
      expandableListDetail.put("As a Ridee",asRidee);
      expandableListDetail.put("My Recent Activities",recent);
  
  
      return expandableListDetail;
  }
  </code></pre>
  
  <p>CustomExpandableListAdapter.java:</p>
  
  <pre><code>public class CustomExpandableListAdapter extends BaseExpandableListAdapter {
  
  private Context mContext;
  private List&lt;String&gt; mGroups;
  private LayoutInflater mInflater;
  private HashMap&lt;String, List&lt;String&gt;&gt; mexpandableListDetail;
  
  public CustomExpandableListAdapter(Context context, List&lt;String&gt; groups,HashMap&lt;String, List&lt;String&gt;&gt; expandableListDetail) {
      mContext = context;
      mGroups = groups;
      mexpandableListDetail = expandableListDetail;
      mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  }
  
  @Override
  public int getGroupCount() {
      return mGroups.size();
  }
  
  @Override
  public int getChildrenCount(int groupPosition) {
      return mexpandableListDetail.get(mGroups.get(groupPosition)).size();
  }
  
  @Override
  public Object getGroup(int groupPosition) {
      return mGroups.get(groupPosition);
  }
  
  @Override
  public Object getChild(int groupPosition, int childPosition) {
      return mexpandableListDetail.get(mGroups.get(groupPosition)).get(childPosition);
  }
  
  @Override
  public long getGroupId(int groupPosition) {
      return 0;
  }
  
  @Override
  public long getChildId(int groupPosition, int childPosition) {
      return 0;
  }
  
  @Override
  public boolean hasStableIds() {
      return false;
  }
  
  @Override
  public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
  
      if (convertView == null) {
          convertView = mInflater.inflate(R.layout.right_drawer_group, null);
      }
  
      // Get the group item
      String listTitle = (String) getGroup(groupPosition);
      // Set group name
      TextView textView = (TextView) convertView.findViewById(R.id.textGroup);
      textView.setText(listTitle);
      ImageView indicator = (ImageView) convertView.findViewById(R.id.groupIndicator);
      if (isExpanded) {
          indicator.setImageResource(R.drawable.arrowup);
      } else {
          indicator.setImageResource(R.drawable.arrowdown);
      }
  
      return convertView;
  }
  
  @Override
  public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
  
  
      if (convertView == null) {
          convertView = mInflater.inflate(R.layout.right_drawer_child, null);
      }
  
      // Get child name
      String children = (String) getChild(groupPosition, childPosition);
  
      // Set child name
      TextView text = (TextView) convertView.findViewById(R.id.textChild);
      text.setText(children);
  
      /*convertView.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Toast.makeText(mContext, children, Toast.LENGTH_SHORT).show();
          }
      });*/
  
      return convertView;
  }
  
  @Override
  public boolean isChildSelectable(int groupPosition, int childPosition) {
      return true;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Please anyone help to me!</p>
  
  <p>Thanks in advance</p>