Skip to content

Commit

Permalink
Merge pull request #6 from fRoSt13iT/master
Browse files Browse the repository at this point in the history
fix issue #3: onItemClick() does not work
  • Loading branch information
orhanobut committed Apr 2, 2015
2 parents cc6536e + e6e2de1 commit 7280b57
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 7280b57

Please sign in to comment.