Android 如何动态访问可扩展listview的子视图?

Android 如何动态访问可扩展listview的子视图?,android,junit,expandablelistview,testcase,expandablelistadapter,Android,Junit,Expandablelistview,Testcase,Expandablelistadapter,我想得到展开的子视图。 在BaseExpandableListAdapter中,让getChildView()重写方法。但是我想在另一个类之外访问这个方法。我该怎么做 我使用了下面的代码来获取子视图。但我无法得到它 final LayoutInflater mLayoutInflater = (LayoutInflater) newCalibrationActivity .getSystemService(Context.LAYOUT_INFLAT

我想得到展开的子视图。 在BaseExpandableListAdapter中,让getChildView()重写方法。但是我想在另一个类之外访问这个方法。我该怎么做

我使用了下面的代码来获取子视图。但我无法得到它

        final LayoutInflater mLayoutInflater = (LayoutInflater) newCalibrationActivity
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        final View view = mLayoutInflater.inflate(R.layout.items_newcalibration_child_3,
                expandableListView, false);

        AutoCompleteTextView mAcTxtCarName = (AutoCompleteTextView) view
                .findViewById(R.id.actxt_car_name);
        AutoCompleteTextView mAcTxtModelNumber = (AutoCompleteTextView) view
                .findViewById(R.id.actxt_model_number);
        EditText mEdTxtLicencePlate1 = (EditText) view.findViewById(R.id.et_licence_plate_1);
        EditText mEdTxtLicencePlate2 = (EditText) view.findViewById(R.id.et_licence_plate_2);
        EditText mEdTxtLicencePlate3 = (EditText) view.findViewById(R.id.et_licence_plate_3);
        AutoCompleteTextView mAcTxtOdometerValue = (AutoCompleteTextView) view
                .findViewById(R.id.actxt_odometer_value);
        AutoCompleteTextView mAcTxtReportingCode = (AutoCompleteTextView) view
                .findViewById(R.id.actxt_reporting_code);
        final NewCalibrationAdapter calibrationAdapter = new NewCalibrationAdapter(
                newCalibrationActivity, calibrationDetails);

        final NewCalibrationAdapter calibrationAdapter = new NewCalibrationAdapter(
                newCalibrationActivity, calibrationDetails);
        final View expandedView = calibrationAdapter.getChildView(2, 0, true, view,
                expandableListView);
        assertSame(view, expandedView);

我已经建立了使用以下链接的解决方案。无法真正找到答案。你能帮忙吗?