2

1 つのグループに 1 つの子があり、別のグループに 2 つの子がいますが、Android の展開可能なビューでその子を取得できませんでした。

int catList = RemoveDuplicateCat.size();
for (int j = 0; j < catList; j++) 
                    {
                        categoryName[j] = new String[1];
                        categoryName[j][0] = EduInterface.categoryNameArrayList
                                .get(j);
                        MyExpandableAdapter test= new MyExpandableAdapter();
                        int child=test.getChildrenCount(j);
                        Log.d("TAG","child: : "+j+"---"
                                + child);
                        for(int i=0;i<child;i++){
                        pointName[j] = new String[child];
                        pointName[j][i] = EduInterface.pointNameArrayList
                                .get(j);
                        pointValue[j] = new String[child];
                        pointValue[j][i] = EduInterface.pointValueArrayList
                                .get(j);
                        Log.d("TAG", j + "categoryName is ::"
                                + categoryName[j][0] + "  point value is ::"
                                + pointName[j][0] + "---" + pointValue[j][0]);
                        }
                    }

                    pointcategoryExpandableList
                            .setAdapter(new MyExpandableAdapter());
                }

public int getChildrenCount(int groupPosition) {
            /*Log.d("TAG", "Cat lenght"+pointName[groupPosition].length);
            Log.d("TAG", "Cat lenght"+categoryName[groupPosition].length);*/
            return categoryName[groupPosition].length;
        }

入手方法のアイデアを教えてください。

丸太の猫:

06-14 01:26:25.971: D/TAG(24608): child: : 0---1
06-14 01:26:25.971: D/TAG(24608): 0categoryName is ::Category 1  point value is ::item 1---12
06-14 01:26:25.971: D/TAG(24608): child: : 1---1  //actual it has 2 child but getting 1
06-14 01:26:25.971: D/TAG(24608): 1categoryName is ::no testing  point value is ::item 2---8
4

0 に答える 0