Android expandablelistview子单击侦听器不工作

Android expandablelistview子单击侦听器不工作,android,Android,在我的android项目中,我正在使用带有SimpleExpandableListAdapter的Expandablelistview,它的onGroupexpand函数正在工作,但是onChildClick下的onChildClick函数不工作。 我已经阅读了所有与此相关的stackoverflow文章,但它不起作用。可能会出现什么错误……否则,请选择LayoutFlater概念。也许你的问题可以解决。你能发布你的代码吗..当我为子元素使用默认布局时,它的子元素单击侦听器工作,但当我为子元素使

在我的android项目中,我正在使用带有
SimpleExpandableListAdapter
Expandablelistview
,它的
onGroupexpand
函数正在工作,但是
onChildClick
下的
onChildClick
函数不工作。

我已经阅读了所有与此相关的stackoverflow文章,但它不起作用。可能会出现什么错误……

否则,请选择LayoutFlater概念。也许你的问题可以解决。

你能发布你的代码吗..当我为子元素使用默认布局时,它的子元素单击侦听器工作,但当我为子元素使用自定义布局时,它的侦听器不工作…可能是我在使用子元素侦听器时遗漏了什么。我理解的是,在getChildview方法中的baseexpandable list adapter中,它返回一个视图,但我的孩子是不同视图(如文本视图、图像和其他)的组合,因此这是一个视图组,所以要消除此问题,需要做什么…使用ListAdapter=new ListAdapter();低压设置适配器(适配器);公共类ListAdapter扩展BaseAdapter{@Override public int getCount(){return position;}@Override public Object getItem(int position){return position;}@Override public long getItemId(int position){return position;}@Override public View getView(int position,View convertView,ViewGroup parent){if(convertView==null){LayoutInflater li=(LayoutInflater)getBaseContext().getSystemService(Context.LAYOUT\u INFLATER\u SERVICE);convertView=li.inflate(R.LAYOUT.urcustomlayout,parent,false);TextView tt=(TextView)convertView.findViewById(R.id.textviewid);与其余视图和id相同这些视图功能在这里类似,如果您有按钮。setonclicklistener()…等等}