ribot / easy-adapter

[DEPRECATED] Easy Adapters library for Android
http://ribot.github.io
Apache License 2.0
421 stars 50 forks source link

get adapter from onSetValues #10

Closed devloe closed 10 years ago

devloe commented 10 years ago

Is there a way to get the adapter, or just the listview asociated with the view holder?

Is it possible to get it from the onSetValues(){ ... }?

ivacf commented 10 years ago

No, ItemViewHolder doesn't hold any reference to the EasyAdapter.

ivacf commented 10 years ago

This could be a new feature for next release so I will leave this issue open.

devloe commented 10 years ago

But is there a way to get the parent listview at least?

ivacf commented 10 years ago

I can't think of any way of getting the ListView. The Adapter (and therefore the ViewHolder) shouldn't be coupled to the a ListView. Your Adapter should be able to work with any AdapterView without making any changes to its code. Why do you want to get the ListView from the ViewHolder?