Reputation: 3916
I'm using the framework from here - cardsui
How can I add a share button to the top of the cards. I've implemented it in the xml with an on click method, but the app crashes when I press it and says that the method doesn't exist (yes, I added the method to the main java file. also to the card.java file but still the app crashes...).
Has anyone used this framework and encountered this?
Thank you
Upvotes: 1
Views: 9180
Reputation: 171
You might want to check this addon for CardsUI: https://github.com/Androguide/cardsui-for-android
As developer wrote:
The Google Play cards come with more customization parameters than the other regular cards, those parameters include :
If you replace the overflow menu with buttons, at least you get a boolean and then handle the actions accordingly.
Upvotes: 3
Reputation: 18725
I wonder if you should just use a simple ListView, and apply a custom background to your adapter to give it the card UI. Then you are just using a simple ListView (with no additional framework - ie. just standard Android UI).
I describe how I did this in the following SO answer: How to create Google + cards UI in a list view?
I would guess that you ARE able to add an onClickListener to the component of your card, as this is pretty standard Android (chances are the Framework you are using DOES support this). Don't know your specific issue unless you post more code.
Upvotes: 0