Skip to content

Commit

Permalink
fix issue #3: onItemClick() does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
frost13it committed Apr 2, 2015
1 parent 2b72fab commit e6e2de1
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ private void refreshList() {
for (int i = 0; i < count; i++) {
final View view = adapter.getView(i, null, this);
final int position = i;
if (itemClickListener != null) {
view.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
view.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (itemClickListener != null) {
itemClickListener.onItemClick(adapter.getItem(position), view, position);
}
});
}
}
});
addView(view);
if (dividerViewResourceId != INVALID && i != count - 1) {
addView(layoutInflater.inflate(dividerViewResourceId, this, false));
Expand Down

0 comments on commit e6e2de1

Please sign in to comment.