-
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.
GibQuote v2.6.1 | It's 2018 | Starring Quotes | RecyclerView Phix
Umm... ** Happy New Year! ** * Implement Un-Starring functionality - User can now un-star a starred quote by pressing the 'star' again - Process: > User stars a quote > Quote is stored in FavQuotes DB, and assigned an unique ID > When user unstars, the FavQuote record is deleted by the ID > Done! * Override getItemId and give position of item, instead of default implementation - i.e. NO_ID -> -1 - This causes RecyclerView to restore the cached View state of an incorrect item (located at a fixed interval) - StackOverflow FTW: https://stackoverflow.com/a/39095384 - Umm, reddit too: https://www.reddit.com/r/androiddev/comments/2lr8bf/what_does_recyclerview_sethasstableids_do_and_why/ - Did this, considering itemId in GibQuoteRecyler is stable (unchanged) - Unchanged, coz Quotes are just added, not removed (from top/bottom/whatever) Signed-off-by: a7r3 <arvindultimate7352@gmail.com>
- Loading branch information
Showing
6 changed files
with
70 additions
and
23 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
1 change: 0 additions & 1 deletion
1
app/src/main/java/com/arvind/quote/fragment/GibQuoteFragment.java
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