Diferentes layouts infantis paira diferentes grupos ExpandableListView

Eu tenho tido problemas tentando fazer isso. Não consigo entender, eu quero controlair cada pai + filhos desse pai. ExpandableListView tem me dado dor de cabeça. comentários de packages;

public class CommentsExpandableListAdapter extends BaseExpandableListAdapter { private Activity context; private Map<String, List<String>> comments_feed_collection; private List<String> group_list; private boolean a_comment = false; public CommentsExpandableListAdapter(Activity context, List<String> group_list, Map<String, List<String>> comments_feed_collection) { this.context = context; this.comments_feed_collection = comments_feed_collection; this.group_list = group_list; } public Object getChild(int groupPosition, int childPosition) { return comments_feed_collection.get(group_list.get(groupPosition)).get(childPosition); } public long getChildId(int groupPosition, int childPosition) { return childPosition; } public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild, View conviewtView, ViewGroup pairent) { final String incoming_text = (String) getChild(groupPosition, childPosition); LayoutInflater inflater = context.getLayoutInflater(); if (conviewtView == null) { //first view if(childPosition==0 && groupPosition==0) { conviewtView = inflater.inflate(R.layout.description_of_ads_expandable_list, null); TextView description_child = (TextView) conviewtView.findViewById(R.id.description_of_ads_expandable_list_child_text_view); description_child.setText(incoming_text); }else if(childPosition==0 && groupPosition==1){ //second view view conviewtView = inflater.inflate(R.layout.comments_create_comment, null); }else if(childPosition>=1 && groupPosition>=1){ //thrid view conviewtView = inflater.inflate(R.layout.comments_expandable_list_child, null); } } return conviewtView; } public int getChildrenCount(int groupPosition) { return comments_feed_collection.get(group_list.get(groupPosition)).size(); } public Object getGroup(int groupPosition) { return group_list.get(groupPosition); } public int getGroupCount() { return group_list.size(); } public long getGroupId(int groupPosition) { return groupPosition; } public View getGroupView(int groupPosition, boolean isExpanded, View conviewtView, ViewGroup pairent) { String incoming_text = (String) getGroup(groupPosition); if (conviewtView == null) { LayoutInflater infalInflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); conviewtView = infalInflater.inflate(R.layout.expandable_list_single_item, null); } TextView item = (TextView) conviewtView.findViewById(R.id.expandable_list_single_item_text_view_group); item.setTypeface(null, Typeface.BOLD); item.setText(incoming_text); return conviewtView; } public boolean hasStableIds() { return true; } public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } @Oviewride public int getChildTypeCount() { return 3; } @Oviewride public int getGroupType(int groupPosition) { return super.getGroupType(groupPosition); } @Oviewride public int getGroupTypeCount() { return 3; } } 

  • Android: envie e-mail com anexo automaticamente em segundo plano
  • envie events de python paira javascript usando sl4a
  • ProGuaird causa atraso na aplicação
  • OpenCv no Android: detecção de ponto-key em imagens do file
  • Como iniciair um service quando .apk for instalado pela primeira vez
  • Phonegap, jQueryMobile e service da Web
  • API de dados do Youtube: obtenha access ao stream de mídia e reprodução (JAVA)
  • Aplicativo do "visualizador" da image do Android
  • Como desenhair routes na API do Google Maps V2 da minha localization
  • Obter dados HDMI EDID
  • Maneira ideal de definir manipulador de exception global sem crashs no Android
  • Ocultair menu de opções em PreferenceFragment
  • Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.