I am trying to build an expandable listview, in which the group indicator should be placed to the right. The code I am using is
faq_ExpandableListView = (ExpandableListView)v. findViewById(R.id.lvExp);
setGroupIndicatorToRight();
private void prepareListdata(){
    listDataChild = new HashMap<String, List<String>>();
    HashMap<String, String> single_item;
    for (int i = 0; i < listDataHeader.size(); i++) {
      single_item = arraylist.get(i);
      List<String> comingSoon = new ArrayList<String>();
      comingSoon.add(single_item.get(AppConstants.faq_answers));
      listDataChild.put(listDataHeader.get(i), comingSoon);
    }
    populateListview();
}
private void populateListview(){
    listAdapter = new com.mawaqaa.babtain.adapter.ExpandableListAdapter(getActivity(), listDataHeader, listDataChild);
    // setting list adapter
    faq_ExpandableListView.setAdapter(listAdapter);
}
  private void setGroupIndicatorToRight() {
        /* Get the screen width */
        DisplayMetrics dm = new DisplayMetrics();
        getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm);
        int width = dm.widthPixels;
        faq_ExpandableListView.setIndicatorBounds(width - getDipsFromPixel(35), width
                - getDipsFromPixel(5));
    }
    public int getDipsFromPixel(float pixels) {
        // Get the screen's density scale
        final float scale = getResources().getDisplayMetrics().density;
        // Convert the dps to pixels, based on density scale
        return (int) (pixels * scale + 0.5f);
    }
The layout is
 <android.support.v7.widget.CardView
        xmlns:card_view="http://schemas.android.com/apk/res-auto"
        card_view:cardBackgroundColor="#fff"
        card_view:cardCornerRadius="8dp"
        android:id="@+id/cardview"
        android:layout_margin="15dp"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">
           <ExpandableListView
            android:id="@+id/lvExp"
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="10dp"
            android:layout_marginLeft="3dp"
            android:layout_marginRight="3dp"
            android:groupIndicator="@drawable/settings_selector"
            android:divider="@android:color/transparent"
            android:cacheColorHint="#00000000"/>   
</android.support.v7.widget.CardView>
settings_selector for group indicator handling is
      <?xml version="1.0" encoding="utf-8"?>
       <animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
      <selector xmlns:android="http://schemas.android.com/apk/res/android">
           <item android:state_expanded="true" android:drawable="@drawable/up_arrow" />
          <item android:drawable="@drawable/down_arrow" />
    </selector>
   </animation-list>
 
     
    