为了解决ListView中Item里的Button独立事件响应,可以采用以下方法:
在BaseAdapter的getview里添加加粗代码:
<span style="font-size:14px;">@Override
public View getView(int position, View view, ViewGroup arg2) {
view = layoutInflater.from(context).inflate(
R.layout.sport_user_list_item, null);
TextView text1 = (TextView) view.findViewById(R.id.user_name);
TextView text2 = (TextView) view.findViewById(R.id.user_grade);
Button button1 = (Button) view.findViewById(R.id.chal......
阅读全文