forked from se-edu/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PersonCard: Add colors to tag labels
The tags are all displayed with the same color. It is hard to differentiate between tags visually across contacts. For example, it is hard to visually group all contacts tagged with "colleague". It is also hard to differentiate between those contacts that are tagged with "colleague", and those that are not tagged with "colleague". Let's add different colors to different tag labels. Tags of the same name will always receive the same color, while different tag names should receive different colors if possible. The hashcode of the tag string is used to determine the tag color. This will assign a reasonably random color to each tag, and will also ensure that the tag color remains the same when the user launches the application again in the future (assuming the application version remains the same). The idea of using hashcode is influenced by a developer's suggestion[1]. [1] nus-cs2103-AY1718S1/forum#199
- Loading branch information
Showing
4 changed files
with
137 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters