на activity есть 4 expandablelistview
должно быть 2 массива с parent'ами и child'ами, а у меня сейчас их 8 для каждого expandablelistview по 2 штуки. Причем структуры этих массивов одинаковые.
В массиве могу сделать поле - признак к какмому listview этот parent и child относится, но не могу отфильтровать никак...
Screen_3_adapter - public class Screen_3_adapter extends BaseExpandableListAdapter ...
Вот выдержка из кода:
Код: Выделить всё
ExpandableListView elvMain;
Screen_3_adapter adapter;
List<array_Group_Questions> array_Group_Questions=new ArrayList<array_Group_Questions>();
ArrayList<List<ru.ds_exp.test_07042016_02.array_Questions>> groups1;
ExpandableListView elvMain_2;
Screen_3_adapter adapter_2;
List<array_Group_Questions> array_Group_Questions_2=new ArrayList<array_Group_Questions>();
ArrayList<List<ru.ds_exp.test_07042016_02.array_Questions>> groups1_2;
ExpandableListView elvMain_3;
Screen_3_adapter adapter_3;
List<array_Group_Questions> array_Group_Questions_3=new ArrayList<array_Group_Questions>();
ArrayList<List<ru.ds_exp.test_07042016_02.array_Questions>> groups1_3;
ExpandableListView elvMain_4;
Screen_3_adapter adapter_4;
List<array_Group_Questions> array_Group_Questions_4=new ArrayList<array_Group_Questions>();
ArrayList<List<ru.ds_exp.test_07042016_02.array_Questions>> groups1_4;
Код: Выделить всё
elvMain = (ExpandableListView) findViewById(R.id.scr_3_card_1_exTv);
elvMain_2 = (ExpandableListView) findViewById(R.id.scr_3_card_2_exTv);
elvMain_3 = (ExpandableListView) findViewById(R.id.scr_3_card_3_exTv);
elvMain_4 = (ExpandableListView) findViewById(R.id.scr_3_card_4_exTv);
groups1 = new ArrayList<>();//Создаем набор данных для адаптера
groups1_2 = new ArrayList<>();//Создаем набор данных для адаптера
groups1_3 = new ArrayList<>();//Создаем набор данных для адаптера
groups1_4 = new ArrayList<>();//Создаем набор данных для адаптера
adapter = new Screen_3_adapter(this, groups1, (ArrayList<ru.ds.array_Group_Questions>) array_Group_Questions);
adapter_2 = new Screen_3_adapter(this, groups1_2, (ArrayList<ru.ds.array_Group_Questions>) array_Group_Questions_2);
adapter_3 = new Screen_3_adapter(this, groups1_3, (ArrayList<ru.ds.array_Group_Questions>) array_Group_Questions_3);
adapter_4 = new Screen_3_adapter(this, groups1_4, (ArrayList<ru.ds.array_Group_Questions>) array_Group_Questions_4);
elvMain.setAdapter(adapter);
elvMain_2.setAdapter(adapter_2);
elvMain_3.setAdapter(adapter_3);
elvMain_4.setAdapter(adapter_4);