For my task for all Group elements in ExpandableListView use xml with TextView and ImageView . Further, for some reason, I need some elements of the Group to change the ImageResource in the ImageView . I wrote this code:
for (int i : fav_numbers){ ImageView imgView = (ImageView) adapter.getGroupView(i, false, null, null).findViewById(R.id.pic); imgView.setImageResource(android.R.drawable.star_big_on); } adapter.notifyDataSetChanged(); //adapter здесь типа SimpleExpandableListAdapter list.setAdapter(adapter); The code is executed, but no changes occur (the image on the elements remains the same). Are there any errors in calling the getGroupView method (I suspect there may be a null, null problem) or need to do it in some other way?