dialogplus
dialogplus copied to clipboard
.setOnItemClickListener((dialog1, item, view, position) returning wrong index
I am using an custom adaptor and returning an arraylist of a custom class, when I am using adaptor.getItem(position); the position returned is 1 above the item selected. It looks like it is not taking into account that Arraylist is 0 indexed?
Thanks for the feedback. Let me check this, I think someone else had the same issue before and was going to contribute, seems it's up to me now.
Thanks for the reply, I will create a fork and take a look as well, hopefully get my head round it!
That would be great!
Actually I faced the same problem, but I solved it by using adapter extends from BasicAdapter, rather than ArrayAdapter .
Enjoy!
ListView as default returns 1 if the list has headerview. If that was the case, I changed this behaviour with 1.1 version. GridHolder and ListHolder will return 0 regardless of headerview.
Im sorry to say that GridHolder still returns the wrong index, for example, I got 6 items to display, and I create a GridHolder using new GridHolder(3). But when I click the second or the third item, I both got a position = 0;
thanks for your great work, but this bug is very upsetting
Yup. Same issue here. no matter what I click on the gridHolder, the item position is always 0. Also, the ripple effect appears on the first item no matter what I click.

Update: As mentioned in issue #72 , this occurs when setExpanded() is set to true. making it false will fix the issue for now.