OnItemClickListener doesn't work with ListView item containing button
问题 I have ListView with custom Adapter which supplies View to ListView in this way: public View getView(int position, View convertView, ViewGroup parent) { RelativeLayout.LayoutParams lineParams; RelativeLayout line=new RelativeLayout(context); TextView tv=new TextView(context); tv.setText("Text in postion="+i); lineParams=new RelativeLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); lineParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT); line