MaterialList icon indicating copy to clipboard operation
MaterialList copied to clipboard

Version 3.1.1 or 3.1.0 doesn't result in successful builds.

Open nicknagi opened this issue 8 years ago • 7 comments

Error:(31, 38) error: cannot find symbol class OnButtonClickListener Error:(32, 47) error: cannot find symbol class BasicImageButtonsCardProvider Error:(241, 22) error: cannot find symbol method clearAll() Error:(245, 22) error: cannot find symbol method clearAll() Error:(363, 27) error: cannot find symbol class BasicImageButtonsCardProvider Error:(366, 43) error: cannot find symbol class BasicImageButtonsCardProvider Error:(373, 63) error: cannot find symbol class OnButtonClickListener Error:(384, 64) error: cannot find symbol class OnButtonClickListener Error:(427, 23) error: cannot find symbol class BasicImageButtonsCardProvider Error:(430, 39) error: cannot find symbol class BasicImageButtonsCardProvider Error:(437, 59) error: cannot find symbol class OnButtonClickListener Error:(450, 60) error: cannot find symbol class OnButtonClickListener

These are the list of errors that I get.

nicknagi avatar Oct 24 '15 02:10 nicknagi

There have been some changes since 3.0.0. The special Providers are no longer accessable. They are all merged together in one single one called CardProvider (or ListCardProvider). If you want to add actions to some view components of your card you can do this with

//...
.withProvider(new CardProvider())
.addAction(R.id.textView, new OnActionClickListener() {...})
//...

FHellmann avatar Oct 24 '15 09:10 FHellmann

So how can I simply use the BasicImageButtonsCard template in my card ? How can I add cards in my recyclerview ? How to I use the clearall() method ? All these things are throwing out an error.

nicknagi avatar Oct 25 '15 03:10 nicknagi

You can use it this way:

MaterialListView listView = (MaterialListView) findViewById(R.id.materialListView);

Card card = new Card.Builder(getContext())
   .withProvider(new CardProvider())
   .setLayout(R.layout.material_basic_buttons_card)
   .addAction(R.id.right_text_button, new TextViewAction(getContext())
      .setText("Action")
      .setListener(new OnActionClickListener() {...}))
   .endConfig()
   .build();

// Add card
listView.getAdapter().add(card);

// Remove all cards
listView.getAdapter().clearAll();

FHellmann avatar Oct 26 '15 09:10 FHellmann

can you show this new pattern in a full sample....this new code just made the library super confusing bc no documentation....

sirvon avatar Oct 27 '15 17:10 sirvon

nm...I see in new code being implemented in the sample app. thx @FHellmann

sirvon avatar Oct 27 '15 17:10 sirvon

Thanks for the help @FHellmann... most of the stuff is working now. The only problem that i have is that when the textViewAction is pressed the card records it as a Short Click as well at the same time. So two events are happening at the same time when only the button press should be recorded. Is this an error on my side ?

nicknagi avatar Oct 29 '15 02:10 nicknagi

Also animations are not working using the recyclerview animations library when I use mListview.clearAll() and then adding cards. It only works for the first time when adding some cards.

nicknagi avatar Oct 31 '15 19:10 nicknagi