gabrielemariotti / cardslib

Android Library to build a UI Card
4.66k stars 1.19k forks source link

Click Listeners for specific Views in Cards with custom layouts? #392

Open noopur121 opened 9 years ago

noopur121 commented 9 years ago

Hi,

I am trying to use this library to create CardViewList that will have Cards with custom layouts.

One of the custom things is a imagebutton which looks like a golden star (represents if the card is a favorite or not). Other than that there are more image buttons that require different kind of click handling.

I have been looking at the demos and all the documentation, and only 3 methods of click handlers:

  1. Whole card click
  2. Partial click handlers (but that not applicable on per View basis)
  3. Header's popout menu

What I am really looking forward to is an ability to handle click events specifically for each View within the Card.

I am not sure if I overlooked at any demo. Is this something that is already possible? If yes, please point me to an example.

thanks.

gabrielemariotti commented 9 years ago

You can set your clickListeners in the setupInnerViewElements method

willowcheng commented 9 years ago

Hi @gabrielemariotti , would you like to share some examples for it? Though I look through your previous answers, I don't quite understand how it works.