BetterAdapters icon indicating copy to clipboard operation
BetterAdapters copied to clipboard

click event

Open nikeru8 opened this issue 7 years ago • 5 comments

It was an interesting project. I would like little more detail in some parts though. I wonder, what do you suggest in order to add click event in each holder? For example, I create dog cat and duck ViewHolder for them that put TextView in every item.

and I press Dog and then cat will change it’s TextView. Thank you.

nikeru8 avatar Jan 03 '18 10:01 nikeru8

For example, I create dog cat and duck ViewHolder for them that put TextView in every item. And I press Dog and then cat will change it’s TextView.

If you click on a Dog the Cat should change?

Please write in more detail and I will try to help you.

meierjan avatar Jan 03 '18 16:01 meierjan

I write a example and this is my dogViewHolder when I selected spinner inside dogViewHolder the amounts of cat will be change. words in TextView in cat will be change too. https://imgur.com/a/9YT9w

I still have no idea how to achieve my goal. thanks a lot

nikeru8 avatar Jan 05 '18 03:01 nikeru8

So you have like:

List:
-------------
[dog catsSpinner#1]
[cat]
List:
-------------
[dog catsSpinner#4]
[cat]
[cat]
[cat]
[cat]

The number in catsSpinner is the amount of cats in the list and you want to change this dyanically?

meierjan avatar Feb 18 '18 16:02 meierjan

@meierjan the expected behavior is:

  • When you click at the Cat item, you should go to one screen
  • When you click at the Dog item, you should go to the other screen

and so on

vsukharew avatar Nov 11 '23 21:11 vsukharew

How does this implementation achieve such behavior?

vsukharew avatar Nov 11 '23 21:11 vsukharew