truffle-shuffle icon indicating copy to clipboard operation
truffle-shuffle copied to clipboard

Add card theme functionality

Open katielevy1 opened this issue 4 years ago • 4 comments

Add the functionality to have various card themes that library consumers can choose from.

  1. Add a new custom attribute for the com.intuit.truffleshuffle.CardViewGroup view called cardTheme that can be set to new themes that will be added.
  2. Create the first card theme with a blue background, white cards, and black text.
  3. Change the example app to use the newly created theme that is inside the library, rather than set the colors itself.

katielevy1 avatar Sep 26 '21 20:09 katielevy1

Hi, I'm a GHC attendee, could I work on this issue?

IceJinx33 avatar Oct 01 '21 17:10 IceJinx33

Hi, I'm a GHC attendee, could I work on this issue?

Yeah!

katielevy1 avatar Oct 01 '21 17:10 katielevy1

@katielevy1 I had a few questions about the task -

  • What sort of attributes do themes have: background color etc.?
  • Also I don't see a specific file in the source code where the characteristics of the cards: text color, card color, etc are chosen.
  • When I create library themes do I just create a file that stores the require theme values?

IceJinx33 avatar Oct 01 '21 18:10 IceJinx33

You can add the attributes to this file https://github.com/intuit/truffle-shuffle/blob/main/truffleshuffle/src/main/res/values/attrs.xml and follow the similar pattern as the spacing attributes. The value set there will be a theme name that will then have the background color, text color, card color set for that specific theme

katielevy1 avatar Oct 01 '21 18:10 katielevy1