---
title: "ListView.setOnItemClickListener无效问题的解决"
author: "dengzh"
date: "2011-06-28T11:23:16Z"
tags: []
categories: ["移动开发"]
slug: "listview-setonitemclicklistener"
draft: false
lastmod: "2011-07-12T18:36:13Z"
id: 1107461
url: "https://dengzh.iteye.com/blog/1107461"
---

如果ListView中的单个Item的view中存在checkbox，button等view，会导致ListView.setOnItemClickListener无效

解决方法：

在checkbox、button的属性中加android:focusable="false"  
   android:clickable="false" android:focusableInTouchMode="false"

其中focusable是关键