-
-
Couldn't load subscription status.
- Fork 156
Feature #384 calculation bookmarks #605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SamuelZima
wants to merge
11
commits into
clementwzk:main
Choose a base branch
from
SamuelZima:feature-#384-calculation-bookmarks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature #384 calculation bookmarks #605
SamuelZima
wants to merge
11
commits into
clementwzk:main
from
SamuelZima:feature-#384-calculation-bookmarks
Conversation
This file contains hidden or 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
- added Bookmark.kt - data class for individual bookmarks, same structure as History.kt - added BookmarksAdapter.kt - for building the recycler view and listeners, very similar style and structure to HistoryAdapter.kt - updated MyPreferences.kt - added bookmark constants, setters and CRUD functions
MainActivity.kt - added Bookmarks RecyclerView setup - added setSwipeTouchHelperForBookmarks() function to delete a bookmark on swipe as in history - added addBookmark() function which bookmarks a calculation - in onResume added runCatching block to refresh bookmarks layout/activity_main.xml - added RecyckerView for Bookmarks to layout/activity_main.xml, layout-land/activity_main.xml, layout-sw-720dp-land/activity_main.xml values/strings.xml - added nothing_to_bookmark and bookmarked string resources
MainActivity.kt - history/bookmarks tabs setup -> default to History tab - added showHistoryList(), showBookmarksList() functions acitivity_main.xml - changed constraint/borders to the tabs and recycler views in all three layouts strings.xml - added bookmarks tab title
MainActivity.kt - updated History/Bookmarks tabs setup, so the sliding panel recycler view is always rendered on top of the calculator buttons to resolve the late rendering of calculator buttons on collapsing activity_main.xml for every layout - added umano overlay and updated paddings strings.xml - added string resource for history tab title
MainActivity.kt - updated addBookmark() function - added bookmark button setup - added currentCalcAndResult() and updateBookmarkIcon() helpers - added updateBookmarkIcon() function call to every place where the calculation is calculated or cleared activity_main.xml - added Bookmark ImageButton - added two bookmark icons to res/drawable/
addBookmark() -> toggleBookmark() - updated the function to toggle the adding or removing of a bookmark for a calculation by clicking on the bookmark icon
MainActivity.kt - added clearBookmarks() function which builds and shows an alert modal and after confirmation deletes all saved bookmarks app_menu.xml - added Clear bookmarks item strings.xml - added strings for the clear bookmarks alert modals
BookmarksAdapter.kt - fixed incorrect grouping of calculations based on relative time to look exactly like history MainActivity.kt - sync the scrollableView with the selected tab, so either history or bookmarks recycler view activity_main.xml - updated layouts to fix the weird scrolling on weird collapsing when clicking on the last two elements in the recycler view in the bookmarks tab by using a barrier and updating constraint for the history_sliding_layout_button
MainActivity.kt - added checkEmptyBookmarksForNoBookmarksLabel() function and updated checkEmptyHistoryForNoHistoryLabel() function to check if we are currently on history or bookmarks tab and if there are no history or bookmark entries - updated showHistoryList() and showBookmarksList() functions - added checkEmptyBookmarksForNoBookmarksLabel() calls after every bookmarks list mutation/deletion activity_main.xml - added TextView element for the no bookmarks text to all three layouts strings.xml - added no bookmarks available string
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added Functionality
Here is a short PDF file containing the aforementioned functionality with added screenshots from the app for better demonstration of the added functionality:
OpenCalc_384_bookmarks.pdf
I tried to implement it correctly across all layouts and with minimal changes to the already existing implementations, but if you find any bugs, weird behaviour or wonky/broken UI feel free to tell me.