2198 Commits

Author SHA1 Message Date
Aditya-Sood
5723554c53 Refactor: Use Field-injection for SharedPreferenceUtil in AddNoteDialog and ConfirmationAlertDialogFragment
* Replaced previously used constructor-injection with field-injection
* Minor refactoring: Remove extra super() calls & use same names for constructor parameters as member variables
2019-06-20 21:52:34 +05:30
Aditya-Sood
62c4655622 Refactor: Avoid adding AddNoteDialog to back-stack and related code changes 2019-06-20 21:22:26 +05:30
Aditya-Sood
77c30ac518 Refactor: Correct the use of string resources 2019-06-20 18:35:08 +05:30
Aditya-Sood
7b8bd2b406 Refactor: Moved ConfirmationAlertDialogFragment to a separate file from AddNoteDialog
ConfirmationAlertDialogFragment is now a generic helper class for displaying a 2-button (positive & negative) confirmation dialog fragment on top of an existing dialog fragment
2019-06-20 17:03:30 +05:30
Aditya-Sood
ffba82e0c7 Refactor: Extract the display of all toasts (related to AddNoteDialog) to a common method showToast() 2019-06-20 13:27:47 +05:30
Aditya-Sood
891cb950ca Refactor: Use ButterKnife to initialise views in AddNoteDialog 2019-06-16 21:49:12 +05:30
Aditya-Sood
11d3e8dea3 Refactor: Use injection (Dagger) for SharedPreferenceUtil in AddNoteDialog 2019-06-16 19:22:13 +05:30
Aditya-Sood
873eb2bce8 Refactor: Refer comments by @macgills in PR #1198 2019-06-15 23:02:56 +05:30
Aditya-Sood
c4bd6a8ee3 Increment: Use ConstraintLayout instead of LinearLayout as root view of AddNoteDialog 2019-06-14 00:04:36 +05:30
Aditya-Sood
c79aa8a9f9 Increment: Confirmation dialog before deleting all notes + Documentation
The 'Clear All Notes' option in the menu now shows a confirmation dialog for deleting all notes. Also added documentation for the feature.
2019-06-12 22:17:50 +05:30
Aditya-Sood
7ff8b67263 Increment: Feature to clear all notes
Option to delete all notes and the folder itself from storage. Added in the menu options of MainActivity
2019-06-10 21:42:25 +05:30
Aditya-Sood
b2df5b3d28 Bug fix: Added response to pressing Back button in AddNoteDialog
In case of an edited note the 'Discard unsaved changes' dialog is displayed for the Back button (same response as is for the cross (X) on top of the dialog)
2019-06-07 19:42:36 +05:30
Aditya-Sood
a7f48d5168 Corrected string resource value for android:hint
In the AddNoteDialog, use the correct value ("Wiki Article Title") instead of "Wiki Book Title" as the android:hint for the note heading
2019-06-07 19:42:36 +05:30
Aditya-Sood
4586530be8 Removed commented code 2019-06-07 19:42:36 +05:30
Aditya-Sood
42909cac3a Remove non-essential files (NoteKeeper.txt, abstract.txt) 2019-06-07 19:41:39 +05:30
Aditya-Sood
c540519332 Minor UI adjustment
Corrected overcrowding in the action bar of MainActivity
2019-06-07 19:41:39 +05:30
Aditya-Sood
3bba631bc6 Refactor AddNoteDialog.java
ConfirmationAlert dialog now shows 'Cancel' as the neutral action button instead of the negative action button
2019-06-07 19:41:39 +05:30
Aditya-Sood
b1949b39d7 Documentaion & code clean-up: AddNoteDialog.java 2019-06-07 19:41:39 +05:30
Aditya-Sood
5f2716dcbf Update NoteKeeper.txt 2019-06-07 19:41:39 +05:30
Aditya-Sood
02087b0986 Documentaion & code clean-up: MainActivity.java 2019-06-07 19:41:39 +05:30
Aditya-Sood
4c18fddcb9 Increment: Added support for Night Mode 2019-06-07 19:41:39 +05:30
Aditya-Sood
c5b94b5f22 Minor UI improvement 2019-06-07 19:41:39 +05:30
Aditya-Sood
17fb3c1aa0 Increment: Added functionality to share note files
The note text files (.txt) can now be shared using the share option on toolbar, via an app chooser
2019-06-07 19:41:39 +05:30
Aditya-Sood
e83b47d690 Bugfixes: Note save & confirmation dialogs
Fix in Previous commit: No confirmation dialog for saved notes

Current fix: Keep listening for state changes beyond first save
2019-06-07 19:41:39 +05:30
Aditya-Sood
f2b98845b6 Increment: Toolbar menu items (share, save) disabled for empty note files 2019-06-07 19:41:39 +05:30
Aditya-Sood
88dd739300 Update NoteKeeper.txt 2019-06-07 19:41:39 +05:30
Aditya-Sood
774802b6c8 Increment: Ask user confirmation before closing note dialog
For edited notes, ask user confirmation for discarding unsaved changes before closing the add note dialog (Unsaved changes are discarded)
2019-06-07 19:41:39 +05:30
Aditya-Sood
73d12f3f7e Update NoteKeeper.txt 2019-06-07 19:41:39 +05:30
Aditya-Sood
84d2e3d166 Update implementation details in NoteKeeper.txt 2019-06-07 19:41:39 +05:30
Aditya-Sood
3676cd01e0 Increment: Save option disabled until note edited
Use TextWatcher to enable save option in toolbar only after user makes a change to the note. Option stays disabled otherwise.
(In keeping with the Material Design guidelines)
2019-06-07 19:41:39 +05:30
Aditya-Sood
3e7b69581c Increment: Note file (if exists) now displayed when the AddNoteDialog opens
If the note file corresponding to the current article exists, then it is displayed in the note content area when the add note dialog is opened
2019-06-07 19:41:39 +05:30
Aditya-Sood
d213270854 Minor UI/UX improvements
- Note area extends to the full screen, with added provision of scrolling for very long notes
- Toast displays result of note file saving (successful or otherwise)
2019-06-07 19:41:39 +05:30
Aditya-Sood
4437d45f5d Refactor to use variables for ZIM file and article titles 2019-06-07 19:41:39 +05:30
Aditya-Sood
368074074e Fix Bug: Note files not getting saved
1) Fixed procedure for saving notes on API level 23+ (Marshmallow onwards), which uses run-time permission checks (& grants) instead of install-time grants

2) Use mkdirs() instead of mkdir() {as the desired path may require creation of multiple directories}

3) Shifted constants from MainActivity.java to Constants.java
2019-06-07 19:41:39 +05:30
Aditya-Sood
21de8175de Minor UI improvement
Note dialog now displays the article title (in text view at top of note area)
2019-06-07 19:41:39 +05:30
Aditya-Sood
9c6bafbf48 Increment: Note files now saved in required manner
Note files are now being saved as per: {External Storage}/Kiwix/Notes/WikiName/ArticleName.txt
2019-06-07 19:41:39 +05:30
Aditya-Sood
38e8eddfb5 Increment: Files now being saved at current directory 2019-06-07 19:41:39 +05:30
Aditya-Sood
e0c5142707 Partial functionality for Save Note
Added code for creating relevant folder (if it doesn't exist) as per: {External Storage}/Kiwix/Notes/
Next: Code for creating a text file in above directory from the entered note text
2019-06-07 19:41:39 +05:30
Aditya-Sood
6466d5cba4 Bug Fix: Missing menu options in Add Note Dialog 2019-06-07 19:41:39 +05:30
Aditya-Sood
f10dbdb083 Updated steps for implementing the feature 2019-06-07 19:41:39 +05:30
Aditya-Sood
1394b97cff Minor UI improvements + Update NoteKeeper.txt 2019-06-07 19:41:39 +05:30
Aditya-Sood
9adeb988e7 Update NoteKeeper.txt 2019-06-07 19:41:39 +05:30
Aditya-Sood
80d897dce4 Basic UI
Barebones UI for the Note Keeper ready, in the form of a fullscreen dialog
Next: UI Enhancements and adding functionality to menu buttons (Save, Share)
2019-06-07 19:41:39 +05:30
Aditya-Sood
a11f1ed8e8 File with implementation details for Note Keeper 2019-06-07 19:40:33 +05:30
Aditya-Sood
fc7b63621b GSoC project abstract 2019-06-07 19:40:33 +05:30
Aditya-Sood
38f236b9f1 Remove non-essential file (abstract.txt) 2019-06-07 13:41:04 +05:30
Aditya-Sood
5f8ba8f038 GSoC project abstract 2019-06-07 13:41:04 +05:30
Aditya-Sood
1cd964c8e7 Remove non-essential file (abstract.txt) 2019-06-07 13:41:04 +05:30
Aditya-Sood
9f0a6b617d GSoC project abstract 2019-06-07 13:41:04 +05:30
soloturn
a43e631de0 switching from apply plugin to pluins {}
following this migration guide:
https://guides.gradle.org/migrating-build-logic-from-groovy-to-kotlin/
2019-06-01 17:37:09 +01:00