├── app ├── .gitignore ├── src │ ├── main │ │ ├── ic_launcher-playstore.png │ │ ├── res │ │ │ ├── font │ │ │ │ ├── caladea_regular.ttf │ │ │ │ ├── comfortaa_regular.ttf │ │ │ │ ├── deja_vu_sans_mono.ttf │ │ │ │ └── merriweather_regular.otf │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── anim │ │ │ │ ├── fade_in.xml │ │ │ │ ├── fade_out.xml │ │ │ │ ├── slide_in.xml │ │ │ │ └── slide_out.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── drawable │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── ic_baseline_arrow_has_subnodes_24.xml │ │ │ │ ├── ic_baseline_arrow_is_parent_24.xml │ │ │ │ ├── ic_outline_home_24.xml │ │ │ │ ├── baseline_format_indent_decrease_24.xml │ │ │ │ ├── baseline_format_indent_increase_24.xml │ │ │ │ ├── baseline_checklist_24.xml │ │ │ │ ├── baseline_format_list_numbered_24.xml │ │ │ │ ├── baseline_format_clear_24.xml │ │ │ │ ├── baseline_list_alt_24.xml │ │ │ │ ├── ic_baseline_arrow_node_up_24.xml │ │ │ │ ├── ic_outline_delete_forever_24.xml │ │ │ │ ├── ic_outline_search_24.xml │ │ │ │ ├── ic_outline_attachment_24.xml │ │ │ │ ├── baseline_format_list_bulleted_24.xml │ │ │ │ ├── ic_outline_anchor_24.xml │ │ │ │ ├── baseline_color_picker_24.xml │ │ │ │ ├── table_border.xml │ │ │ │ ├── table_data_cell.xml │ │ │ │ ├── table_header_cell.xml │ │ │ │ ├── monospace.xml │ │ │ │ ├── baseline_format_italic_24.xml │ │ │ │ ├── ic_baseline_create_node_24.xml │ │ │ │ ├── ic_baseline_arrow_up_24.xml │ │ │ │ ├── ic_baseline_arrow_back_24.xml │ │ │ │ ├── baseline_arrow_back_ios_24.xml │ │ │ │ ├── ic_outline_close_24.xml │ │ │ │ ├── baseline_format_color_text_24.xml │ │ │ │ ├── baseline_format_underlined_24.xml │ │ │ │ ├── outline_image_24.xml │ │ │ │ ├── ic_baseline_edit_24.xml │ │ │ │ ├── baseline_background_color_24.xml │ │ │ │ ├── ic_baseline_save_24.xml │ │ │ │ ├── baseline_add_circle_outline_24.xml │ │ │ │ ├── ic_baseline_menu_item_action_24.xml │ │ │ │ ├── ic_baseline_bookmarks_on_24.xml │ │ │ │ ├── baseline_format_bold_24.xml │ │ │ │ ├── ic_outline_bookmarks_off_24.xml │ │ │ │ ├── baseline_table_24.xml │ │ │ │ ├── ic_baseline_export_24.xml │ │ │ │ ├── baseline_attachment_button_24.xml │ │ │ │ ├── baseline_strikethrough_s_24.xml │ │ │ │ ├── outline_table_edit_delete_col.xml │ │ │ │ ├── outline_table_edit_delete_row.xml │ │ │ │ ├── outline_table_edit_insert_col.xml │ │ │ │ ├── outline_table_edit_insert_row.xml │ │ │ │ ├── baseline_backup_delete_table.xml │ │ │ │ ├── ic_launcher_foreground.xml │ │ │ │ ├── ic_launcher_foreground_monochrome.xml │ │ │ │ ├── ic_outline_broken_latex_48.xml │ │ │ │ └── ic_outline_broken_image_48.xml │ │ │ ├── values-night │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── xml │ │ │ │ ├── filepaths.xml │ │ │ │ ├── preferences_general.xml │ │ │ │ ├── preferences.xml │ │ │ │ ├── preferences_database.xml │ │ │ │ ├── preferences_appearance.xml │ │ │ │ └── preferences_database_mirror_database.xml │ │ │ ├── menu │ │ │ │ ├── options_menu_fragment_with_home_button.xml │ │ │ │ ├── options_menu_node_editor_fragment.xml │ │ │ │ ├── options_menu_main_activity.xml │ │ │ │ └── options_menu_node_content_fragment.xml │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── themes.xml │ │ │ │ └── arrays.xml │ │ │ ├── layout │ │ │ │ ├── fragment_node_content.xml │ │ │ │ ├── custom_edittext.xml │ │ │ │ ├── fragment_image_view.xml │ │ │ │ ├── alert_dialog_unsaved_changes.xml │ │ │ │ ├── item_search_activity_result.xml │ │ │ │ ├── fragment_node_editor.xml │ │ │ │ ├── dialog_fragment_collect_nodes.xml │ │ │ │ ├── dialog_fragment_open_database_progress.xml │ │ │ │ ├── activity_preferences.xml │ │ │ │ ├── dialog_fragment_save_open.xml │ │ │ │ ├── item_drawer_menu.xml │ │ │ │ ├── item_move_node_fragment.xml │ │ │ │ ├── item_imported_databases.xml │ │ │ │ └── fragment_search.xml │ │ │ └── xml-v28 │ │ │ │ └── preferences_database.xml │ │ └── java │ │ │ └── lt │ │ │ └── ffda │ │ │ └── sourcherry │ │ │ ├── utils │ │ │ ├── DatabaseType.java │ │ │ ├── MenuItemAction.java │ │ │ ├── Constants.java │ │ │ ├── ColorPickerPresets.java │ │ │ ├── CheckBoxSwitch.java │ │ │ ├── PreferencesUtils.java │ │ │ ├── Calculations.java │ │ │ ├── OrderedSwitch.java │ │ │ ├── RegexPatterns.java │ │ │ ├── UnorderedSwitch.java │ │ │ └── ReturnSelectedFileUriForSaving.java │ │ │ ├── database │ │ │ ├── DatabaseVacuum.java │ │ │ └── MultiDbFileShare.java │ │ │ ├── fragments │ │ │ ├── NodeContentEditorMenuBackAction.java │ │ │ ├── NodeContentEditorInsertMenuActions.java │ │ │ ├── NodeContentEditorTableMenuActions.java │ │ │ ├── NodeContentEditorListsMenuActions.java │ │ │ └── NodeContentEditorMainMenuActions.java │ │ │ ├── ScApplication.java │ │ │ ├── spans │ │ │ ├── URLSpanWebs.java │ │ │ ├── TypefaceSpanFamily.java │ │ │ ├── StyleSpanBold.java │ │ │ ├── StyleSpanItalic.java │ │ │ ├── BackgroundColorSpanCustom.java │ │ │ ├── MonospaceBackgroundColorSpan.java │ │ │ ├── ClickableSpanLink.java │ │ │ ├── ClickableSpanFile.java │ │ │ ├── ClickableSpanNode.java │ │ │ ├── ImageSpanLatex.java │ │ │ ├── ImageSpanImage.java │ │ │ └── ImageSpanAnchor.java │ │ │ ├── model │ │ │ ├── ScNodeContent.java │ │ │ ├── FileInfo.java │ │ │ └── ScNodeContentText.java │ │ │ ├── runnables │ │ │ ├── FindInNodeRunnableCallback.java │ │ │ └── NodesCollectedCallback.java │ │ │ ├── preferences │ │ │ └── PreferencesFragment.java │ │ │ ├── AppContainer.java │ │ │ └── customUiElements │ │ │ ├── ScTableLayout.java │ │ │ └── CustomTextEdit.java │ ├── test │ │ └── java │ │ │ └── lt │ │ │ └── ffda │ │ │ └── sourcherry │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── lt │ │ └── ffda │ │ └── sourcherry │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── fastlane └── metadata │ └── android │ ├── en-US │ ├── title.txt │ ├── short_description.txt │ ├── changelogs │ │ ├── 15.txt │ │ ├── 16.txt │ │ ├── 13.txt │ │ ├── 7.txt │ │ ├── 14.txt │ │ ├── 12.txt │ │ ├── 9.txt │ │ ├── 5.txt │ │ ├── 6.txt │ │ └── 11.txt │ ├── images │ │ ├── icon.png │ │ └── phoneScreenshots │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ └── 4.png │ └── full_description.txt │ └── de │ └── short_description.txt ├── .idea ├── .gitignore ├── copyright │ ├── profiles_settings.xml │ └── GNU_GPL_v3.xml ├── compiler.xml ├── vcs.xml └── gradle.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── settings.gradle ├── .gitignore ├── gradle.properties └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/title.txt: -------------------------------------------------------------------------------- 1 | SourCherry -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/short_description.txt: -------------------------------------------------------------------------------- 1 | App to open CherryTree databases -------------------------------------------------------------------------------- /fastlane/metadata/android/de/short_description.txt: -------------------------------------------------------------------------------- 1 | App zum Öffnen von CherryTree-Datenbanken -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/15.txt: -------------------------------------------------------------------------------- 1 | v1.7.1 2 | - Fixes crashes caused by pressing Enter while editing a node; -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/font/caladea_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/font/caladea_regular.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/comfortaa_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/font/comfortaa_regular.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/deja_vu_sans_mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/font/deja_vu_sans_mono.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/merriweather_regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/font/merriweather_regular.otf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/fastlane/metadata/android/en-US/images/icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FFDA/SourCherry/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/16.txt: -------------------------------------------------------------------------------- 1 | v1.8.0 2 | - Support for Android 15 (edge-to-edge); 3 | - Auto-export for MirrorDatabase; 4 | - Restored file associations; 5 | - Embedded monospace font; 6 | - New icon; -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/13.txt: -------------------------------------------------------------------------------- 1 | v1.6.0 2 | - Support for attaching files; 3 | - Support for inserting images; 4 | - Support for inserting, removing, and editing tables; 5 | - Support for shared nodes (fixed crashes caused by them) 6 | - Bug fixes and stability improvements; 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 06 18:17:29 EEST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/7.txt: -------------------------------------------------------------------------------- 1 | v1.2.0 2 | - Add commentMore actions 3 | - Updated some dependencies; 4 | - Fixed: crash during search; 5 | - Changed: extracted database filenames had random(?) integers inserted into them; 6 | - Mirror Database; 7 | - Fixed: codeboxes encapsulating more text than they should; 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_in.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_out.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/14.txt: -------------------------------------------------------------------------------- 1 | v1.7.0 2 | - Support for monoscape font for node content and ability to toggle it for selected text in editing; 3 | - Node properties now display the node id and node group information; 4 | - Support for creating list (including changing status of checkboxes); 5 | - Option to use embedded file name on disk for multifile databases; 6 | - Some bug fixes; 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/full_description.txt: -------------------------------------------------------------------------------- 1 | Free and open-source application for opening CherryTree databases. 2 | 3 | Features: 4 | 5 | - Supports XML, SQLite and Multifile storage database 6 | - Supports password protected databases 7 | - Database search 8 | - Search in node text 9 | - Database export 10 | - Node export to PDF 11 | - Creating/editing nodes 12 | 13 | https://github.com/FFDA/SourCherry -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/12.txt: -------------------------------------------------------------------------------- 1 | v1.5.0 2 | - Add commentMore actions 3 | - Support for Multifile database; 4 | - Fixed the crash when trying to enlarge an image after the orientation change; 5 | - Added the ability to change the font of the node content; 6 | - FindInNode now marks all results at once; 7 | - Fixed FindInNode on Android 7 devices; 8 | - Some other small bug fixes and stability improvements; 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | } 7 | } 8 | dependencyResolutionManagement { 9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 10 | repositories { 11 | google() 12 | mavenCentral() 13 | maven { url 'https://jitpack.io' } 14 | } 15 | } 16 | rootProject.name = "SourCherry" 17 | include ':app' 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_arrow_has_subnodes_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_arrow_is_parent_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_outline_home_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #CA2A2A 4 | #636363 5 | #7f7f7f 6 | #2FC848 7 | #D3AD56 8 | #C3C3D6 9 | #535353 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_format_indent_decrease_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_format_indent_increase_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/test/java/lt/ffda/sourcherry/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package lt.ffda.sourcherry; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_checklist_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_format_list_numbered_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_format_clear_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/9.txt: -------------------------------------------------------------------------------- 1 | v1.3.0 2 | - Add commentMore actions 3 | - Function to add/remove node to/from bookmarks; 4 | - Function to add/move/detete node; 5 | - Function to change some properties of the node; 6 | - Function to edit plain text and automatic syntax highlighting nodes; 7 | - Function to export databases. 8 | - Changed dependency for extracting password protected database to “com.github.omicronapps:7-Zip-Jbinding-4Android”; 9 | - Support for password protected databases for Android 7 (API 24 & 25); 10 | - Updated target SDK to 33; 11 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/5.txt: -------------------------------------------------------------------------------- 1 | v1.0.0 2 | - Small UI changes and under the hood improvements; 3 | - Find in node; 4 | - Fixed: images wider than a screen not loading/displaying;Add commentMore actions 5 | - Fixed: Crash when opening node with too large image; 6 | - Fixed: SQLSearcher not finding all instances of the query; 7 | - Fixed: Crash when trying to open an image in ImageViewActivity; 8 | - Settings: Default action for embedded files; 9 | - Settings: Node content text size; 10 | - Fixed: node content not loading when selecting an item after goNodeUp(); 11 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/6.txt: -------------------------------------------------------------------------------- 1 | v1.1.0 2 | - Partial LatexBox support; 3 | - Export to PDF; 4 | - Settings: option to increase SQL cursor window for Android 9 devices; 5 | - Icon update; 6 | - Placeholders for images/latex boxes that fail to load; 7 | - Fixed: App crashing when saving a file with not recognizable MIME type; 8 | - Fixed: Bookmarked nodes not sorted in the same order as in CherryTree when using XML database; 9 | - Fixed: crash when opening database that does no longer exits; 10 | - Disabled opening encrypted databases for Android 7 and lower; 11 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/11.txt: -------------------------------------------------------------------------------- 1 | v1.4.0 2 | - Add commentMore actions 3 | - Saving a Rich Text node should not lose any formatting. 4 | - Editing: change foreground/background color, italic, bold, underline and strikethrough properties. Clear formatting. 5 | - Split Settings to multiple screens; 6 | - Added Vacuum function for SQL databases; 7 | - Added support for 4H, H5 and H6; 8 | - Enabled creation of Rich Text nodes. Made it a default option; 9 | - Confirmation dialog for “Delete node” action; 10 | - DrawerMenu items now have the same font color as in CherryTree; 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_list_alt_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_arrow_node_up_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_outline_delete_forever_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_outline_search_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_outline_attachment_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_format_list_bulleted_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_outline_anchor_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/main/res/xml/filepaths.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/copyright/GNU_GPL_v3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/utils/DatabaseType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.utils; 12 | 13 | public enum DatabaseType { 14 | SQL, XML, MULTI 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_color_picker_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/androidTest/java/lt/ffda/sourcherry/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package lt.ffda.sourcherry; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.ffda.sourcherry", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/options_menu_fragment_with_home_button.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/database/DatabaseVacuum.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.database; 12 | 13 | public interface DatabaseVacuum { 14 | /** 15 | * Vacuums SQL database to reduce it's size 16 | */ 17 | void vacuum(); 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/table_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/table_data_cell.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/utils/MenuItemAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.utils; 12 | 13 | public enum MenuItemAction { 14 | DISMISS, ADD_SIBLING_NODE, ADD_SUBNODE, ADD_TO_BOOKMARKS, REMOVE_FROM_BOOKMARKS, MOVE_NODE, DELETE_NODE, PROPERTIES 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/table_header_cell.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/fragments/NodeContentEditorMenuBackAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.fragments; 12 | 13 | public interface NodeContentEditorMenuBackAction { 14 | 15 | /** 16 | * Returns to previous node content editor menu 17 | */ 18 | void back(); 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FF000000 4 | #FFFFFFFF 5 | #FFFFFF 6 | #CA2A2A 7 | #F6F8FA 8 | #7f7f7f 9 | #E68B7F 10 | #E54D3A 11 | #AC1111 12 | #750000 13 | #58A5F0 14 | #0277BD 15 | #004C8C 16 | #07841B 17 | #8B691C 18 | #7F7F8D 19 | #FFFFFFFF 20 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/ScApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry; 12 | 13 | import android.app.Application; 14 | 15 | /** 16 | * Application class that is available to all Activities 17 | */ 18 | public class ScApplication extends Application { 19 | public AppContainer appContainer = new AppContainer(); 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/spans/URLSpanWebs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.spans; 12 | 13 | import android.text.style.URLSpan; 14 | 15 | /** 16 | * Span used to show website links 17 | */ 18 | public class URLSpanWebs extends URLSpan { 19 | public URLSpanWebs(String url) { 20 | super(url); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_node_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_in.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_out.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | /.idea/caches 3 | /.idea/libraries 4 | /.idea/modules.xml 5 | /.idea/workspace.xml 6 | /.idea/navEditor.xml 7 | /.idea/assetWizardSettings.xml 8 | .DS_Store 9 | /captures 10 | .externalNativeBuild 11 | .cxx 12 | 13 | # Built application files 14 | *.apk 15 | *.ap_ 16 | 17 | # Files for the Dalvik VM 18 | *.dex 19 | 20 | # Java class files 21 | *.class 22 | 23 | # Gradle files 24 | .gradle/ 25 | build/ 26 | */build/ 27 | /build 28 | .gradle 29 | 30 | # Local configuration name (sdk path, etc) 31 | local.properties 32 | /local.properties 33 | 34 | # Proguard folder generated by Eclipse 35 | proguard/ 36 | 37 | # Log Files 38 | *.log 39 | 40 | .idea 41 | .idea/libraries/ 42 | .idea/workspace.xml 43 | app/app.iml 44 | app/build.gradle 45 | 46 | # Keystore files 47 | *.jks 48 | *.keystore 49 | 50 | # Google Services (e.g. APIs or Firebase) 51 | google-services.json 52 | 53 | # Android Profiling 54 | *.hprof 55 | 56 | # Android Studio generated files and folders 57 | captures/ 58 | .externalNativeBuild/ 59 | .cxx/ 60 | *.apk 61 | output.json 62 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/utils/Constants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.utils; 12 | 13 | public class Constants { 14 | public final static String DATABASE_EXPORT_NOTI = "DATABASE_EXPORT_NOTI"; 15 | 16 | public final static String PREFERENCE_DARK_MODE = "preferences_dark_mode"; 17 | public final static String PREFERENCE_DISABLE_LINEWRAP = "preferences_linewrap"; 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/spans/TypefaceSpanFamily.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.spans; 12 | 13 | import android.text.style.TypefaceSpan; 14 | 15 | import androidx.annotation.Nullable; 16 | 17 | /** 18 | * Span used to display monospace text 19 | */ 20 | public class TypefaceSpanFamily extends TypefaceSpan { 21 | public TypefaceSpanFamily(@Nullable String family) { 22 | super(family); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/monospace.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/spans/StyleSpanBold.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.spans; 12 | 13 | import android.graphics.Typeface; 14 | import android.text.style.StyleSpan; 15 | 16 | /** 17 | * Span used to show Bold typeface 18 | */ 19 | public class StyleSpanBold extends StyleSpan { 20 | public StyleSpanBold() { 21 | super(Typeface.BOLD); 22 | } 23 | 24 | public StyleSpanBold(int style) { 25 | super(style); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_format_italic_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_create_node_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/menu/options_menu_node_editor_fragment.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 13 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/spans/StyleSpanItalic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.spans; 12 | 13 | import android.graphics.Typeface; 14 | import android.text.style.StyleSpan; 15 | 16 | /** 17 | * Span used to show Italic typeface 18 | */ 19 | public class StyleSpanItalic extends StyleSpan { 20 | public StyleSpanItalic() { 21 | super(Typeface.ITALIC); 22 | } 23 | 24 | public StyleSpanItalic(int style) { 25 | super(style); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/model/ScNodeContent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.model; 12 | 13 | public interface ScNodeContent { 14 | /** 15 | * Get ScNodeContent type 16 | * @return 0 - text to set into TextView, 1 - table content 17 | */ 18 | byte getContentType(); 19 | 20 | /** 21 | * Set node content type 22 | * @param type 0 - text to set into TextView, 1 - table content 23 | */ 24 | void setContentType(byte type); 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/runnables/FindInNodeRunnableCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.runnables; 12 | 13 | public interface FindInNodeRunnableCallback { 14 | /** 15 | * Callback method that will be executed after running search for findInNode function 16 | */ 17 | void searchFinished(); 18 | 19 | /** 20 | * Callback method that will be executed before running search for findInNode function 21 | */ 22 | void searchStarted(); 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_arrow_up_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/menu/options_menu_main_activity.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 16 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/spans/BackgroundColorSpanCustom.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.spans; 12 | 13 | import android.text.style.BackgroundColorSpan; 14 | 15 | /** 16 | * Span to mark background color. Needed to separate between CodeBox, Background and Monospace font 17 | * background spans. 18 | */ 19 | public class BackgroundColorSpanCustom extends BackgroundColorSpan { 20 | public BackgroundColorSpanCustom(int color) { 21 | super(color); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_arrow_back_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/preferences/PreferencesFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.preferences; 12 | 13 | import android.os.Bundle; 14 | 15 | import androidx.preference.PreferenceFragmentCompat; 16 | 17 | import lt.ffda.sourcherry.R; 18 | 19 | public class PreferencesFragment extends PreferenceFragmentCompat { 20 | 21 | @Override 22 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 23 | setPreferencesFromResource(R.xml.preferences, rootKey); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/spans/MonospaceBackgroundColorSpan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.spans; 12 | 13 | import android.text.style.BackgroundColorSpan; 14 | 15 | /** 16 | * Span to mark background color of the monospace font spans. Needed to separate between CodeBox, 17 | * Background and Monospace font background spans. 18 | */ 19 | public class MonospaceBackgroundColorSpan extends BackgroundColorSpan { 20 | public MonospaceBackgroundColorSpan(int color) { 21 | super(color); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_arrow_back_ios_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 18 | 19 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/fragments/NodeContentEditorInsertMenuActions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.fragments; 12 | 13 | public interface NodeContentEditorInsertMenuActions { 14 | /** 15 | * Attaches file to the node 16 | */ 17 | void attachFile(); 18 | 19 | /** 20 | * Inserts image into the node 21 | */ 22 | void insertImage(); 23 | 24 | /** 25 | * Shows fragment with options to customize the table before creation 26 | */ 27 | void startInsertTable(); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/runnables/NodesCollectedCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.runnables; 12 | 13 | /** 14 | * Callback to execute commands after collecting all the nodes from Multifile database into 15 | * drawer_menu.xml file. 16 | */ 17 | public interface NodesCollectedCallback { 18 | /** 19 | * Callback method to proceed after collect of failing to collect drawer_menu.xml 20 | * @param result 0 - success, 1 - failed, 2 - canceled 21 | */ 22 | void onNodesCollected(int result); 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_outline_close_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_format_color_text_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_format_underlined_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_image_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/utils/ColorPickerPresets.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.utils; 12 | 13 | public enum ColorPickerPresets { 14 | BLUE(-10313494), 15 | GREEN(-11017335), 16 | YELLOW(-465828), 17 | ORANGE(-23736), 18 | RED(-630447), 19 | VIOLET(-2323747), 20 | BROWN(-3298417), 21 | WHITE(-1), 22 | BLACK(-8948101); 23 | 24 | private final int color; 25 | 26 | ColorPickerPresets(int color) { 27 | this.color = color; 28 | } 29 | 30 | public int getColor() { 31 | return color; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_edit_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_background_color_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_save_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_add_circle_outline_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_edittext.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_menu_item_action_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_bookmarks_on_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_image_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/database/MultiDbFileShare.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.database; 12 | 13 | import android.net.Uri; 14 | public interface MultiDbFileShare { 15 | 16 | /** 17 | * Returns Uri of the file inside multi file database 18 | * @param nodeUniqueID unique id of the node 19 | * @param filename filename of the file attached to the node 20 | * @param control sha256sum sum of the file when "Use embedded file name on disk" is not turned on 21 | * @return uri of the file 22 | */ 23 | public Uri getAttachedFileUri(String nodeUniqueID, String filename, String control); 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_format_bold_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/fragments/NodeContentEditorTableMenuActions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.fragments; 12 | 13 | public interface NodeContentEditorTableMenuActions { 14 | /** 15 | * Deletes focused column 16 | */ 17 | void deleteColumn(); 18 | 19 | /** 20 | * Deletes focused row 21 | */ 22 | void deleteRow(); 23 | 24 | /** 25 | * Deletes focused table 26 | */ 27 | void deleteTable(); 28 | 29 | /** 30 | * Inserts column to the right of the focused column 31 | */ 32 | void insertColumn(); 33 | 34 | /** 35 | * Inserts row bellow the focused row 36 | */ 37 | void insertRow(); 38 | } 39 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Enables namespacing of each library's R class so that its R class includes only the 19 | # resources declared in the library itself and none from the library's dependencies, 20 | # thereby reducing the size of the R class for that library 21 | android.nonTransitiveRClass=true 22 | android.nonFinalResIds=false -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_outline_bookmarks_off_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/alert_dialog_unsaved_changes.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | 18 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_table_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_export_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_attachment_button_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_search_activity_result.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 18 | 22 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_node_editor.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 18 | 19 | 24 | 25 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_strikethrough_s_24.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_fragment_collect_nodes.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 21 | 22 | 28 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/AppContainer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry; 12 | 13 | import android.os.Handler; 14 | import android.os.Looper; 15 | 16 | import java.util.concurrent.Executors; 17 | import java.util.concurrent.ScheduledThreadPoolExecutor; 18 | 19 | /** 20 | * Dependencies container class where all dependencies available for all the classes are stored. 21 | */ 22 | public class AppContainer { 23 | public ScheduledThreadPoolExecutor executor = getExecutor(); 24 | public Handler handler = getHandler(); 25 | 26 | private ScheduledThreadPoolExecutor getExecutor() { 27 | ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(2); 28 | executor.setRemoveOnCancelPolicy(true); 29 | return executor; 30 | } 31 | 32 | private Handler getHandler() { 33 | return new Handler(Looper.getMainLooper()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_fragment_open_database_progress.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 21 | 22 | 29 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/utils/CheckBoxSwitch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.utils; 12 | 13 | /** 14 | * Enum of checkbox states 15 | */ 16 | public enum CheckBoxSwitch { 17 | EMPTY(9744, "☐"), // U+2610 18 | CHECKED(9745, "☑"), // U+2611 19 | CROSSED(9746, "☒"); // U+2612 20 | 21 | private final int code; 22 | private final String string; 23 | 24 | CheckBoxSwitch(int code, String string) { 25 | this.code = code; 26 | this.string = string; 27 | } 28 | 29 | /** 30 | * Returns unicode decimal code of the checkbox 31 | * @return unicode decimal code 32 | */ 33 | public int getCode() { 34 | return code; 35 | } 36 | 37 | /** 38 | * Returns CharSequence value of CheckBox that can be used in replace method 39 | * @return CharSequence value of CheckBox 40 | */ 41 | public String getString() { 42 | return string; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 25 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/utils/PreferencesUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.utils; 12 | 13 | import android.content.SharedPreferences; 14 | 15 | import androidx.annotation.NonNull; 16 | 17 | /** 18 | * Class holds commands to disable specific preferences at one 19 | */ 20 | public class PreferencesUtils { 21 | 22 | /** 23 | * Disables MirrorDatabase preferences 24 | * @param sharedPreferences apps SharedPreferences instance 25 | */ 26 | public static void disableMirrorDatabase(@NonNull SharedPreferences sharedPreferences) { 27 | SharedPreferences.Editor sharedPreferencesEditor = sharedPreferences.edit(); 28 | sharedPreferencesEditor.putBoolean("mirror_database_switch", false); 29 | sharedPreferencesEditor.putBoolean("mirror_database_auto_export_switch", false); 30 | sharedPreferencesEditor.remove("mirrorDatabaseFilename"); 31 | sharedPreferencesEditor.remove("mirrorDatabaseLastModified"); 32 | sharedPreferencesEditor.commit(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_table_edit_delete_col.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_fragment_save_open.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 18 | 26 | 27 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_drawer_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 20 | 21 | 27 | 28 | 37 | 38 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | Light 15 | Dark 16 | System 17 | 18 | 19 | 20 | Ask 21 | Save 22 | Open 23 | 24 | 25 | 26 | Ask 27 | Exit without saving 28 | Save and exit 29 | 30 | 31 | 32 | ask 33 | exit 34 | save 35 | 36 | 37 | 38 | Default 39 | DejaVuSansMono 40 | Comfortaa 41 | Merriweather 42 | Caladea 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_table_edit_delete_row.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/fragments/NodeContentEditorListsMenuActions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.fragments; 12 | 13 | public interface NodeContentEditorListsMenuActions { 14 | 15 | /** 16 | * Starts checklist at the current line. Insert empty checkbox ant the beginning of the current 17 | * line. If there is a checkbox at the start of the line - removes it. 18 | */ 19 | void startChecklist(); 20 | 21 | /** 22 | * Starts unordered list at the current line. If the line is already an unordered list line - 23 | * makes it a normal line. 24 | */ 25 | void startUnordered(); 26 | 27 | /** 28 | * Starts ordered list at the current line. If the line is already an ordered list line - 29 | * makes it a normal line. 30 | */ 31 | void startOrdered(); 32 | 33 | /** 34 | * Decreases list item indentation. Changes list items symbol if necessary. 35 | */ 36 | void decreaseListItemIndentation(); 37 | 38 | /** 39 | * Increases list item indentation. Changes list items symbol if necessary. 40 | */ 41 | void increaseListItemIndentation(); 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/model/FileInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.model; 12 | 13 | import android.net.Uri; 14 | 15 | /** 16 | * Holds data for the MirrorDatabase file found in MirrorDatabase folder set in settings 17 | */ 18 | public class FileInfo { 19 | private long modified = 0; 20 | private Uri uri; 21 | 22 | /** 23 | * Get last modified date if the file 24 | * @return last modified of the database file, 0 - if database file was not found 25 | */ 26 | public long getModified() { 27 | return modified; 28 | } 29 | 30 | /** 31 | * Get Uri of found mirror database 32 | * @return Uri of file 33 | */ 34 | public Uri getUri() { 35 | return uri; 36 | } 37 | 38 | /** 39 | * Set last modified date of the file 40 | * @param modified last modified date 41 | */ 42 | public void setModified(long modified) { 43 | this.modified = modified; 44 | } 45 | 46 | /** 47 | * Set Uri of the mirror database 48 | * @param uri Uri of file 49 | */ 50 | public void setUri(Uri uri) { 51 | this.uri = uri; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_table_edit_insert_col.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/outline_table_edit_insert_row.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_backup_delete_table.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 21 | 25 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/spans/ClickableSpanLink.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.spans; 12 | 13 | import android.text.style.ClickableSpan; 14 | 15 | /** 16 | * Span used to display links to folders and files. 17 | * Holds additional values of link type and link itself 18 | */ 19 | public abstract class ClickableSpanLink extends ClickableSpan { 20 | private String linkType; 21 | private String base64Link; 22 | 23 | /** 24 | * Sets link type 25 | * @return link type. For folder - "fold", files - "file" 26 | */ 27 | public String getLinkType() { 28 | return this.linkType; 29 | } 30 | 31 | /** 32 | * Sets link type 33 | * @param linkType link type. For folder - "fold", files - "file" 34 | */ 35 | public void setLinkType(String linkType) { 36 | this.linkType = linkType; 37 | } 38 | 39 | /** 40 | * Returns link encrypted in base64 41 | * @return link url/path in base64 42 | */ 43 | public String getBase64Link() { 44 | return this.base64Link; 45 | } 46 | 47 | /** 48 | * Set link url/path 49 | * @param base64Link link url/path in base64 50 | */ 51 | public void setBase64Link(String base64Link) { 52 | this.base64Link = base64Link; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/utils/Calculations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.utils; 12 | 13 | import android.content.res.Resources; 14 | 15 | public class Calculations { 16 | /** 17 | * Converts provided PX value to DP and returns it 18 | * @param paddingInPX padding value in PX to be converted 19 | * @return padding value in DP 20 | */ 21 | public static int pxToDp(int paddingInPX) { 22 | return (int) (paddingInPX / Resources.getSystem().getDisplayMetrics().density); 23 | } 24 | 25 | /** 26 | * Converts provided DP value to PX and returns it 27 | * @param paddingInDP padding value in DP to be converted 28 | * @return padding value in PX 29 | */ 30 | public static int dpToPx(int paddingInDP) { 31 | return (int) (paddingInDP * Resources.getSystem().getDisplayMetrics().density); 32 | } 33 | 34 | /** 35 | * Calculates position to scroll horizontally to display FindInNode result to the user 36 | * @param scrollToX primary horizontal position 37 | * @return posittion to scroll horizontally 38 | */ 39 | public static int adjustScrollToX(float scrollToX) { 40 | if (Resources.getSystem().getDisplayMetrics().density < scrollToX) { 41 | scrollToX -= 40; // Arbitrary position adjustment 42 | } 43 | return (int) scrollToX; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | } 4 | 5 | android { 6 | compileSdk 35 7 | 8 | defaultConfig { 9 | applicationId 'lt.ffda.sourcherry' 10 | minSdk 24 11 | targetSdk 35 12 | versionCode 16 13 | versionName "1.8.0" 14 | 15 | base.archivesName = "SourCherry_" + versionName 16 | 17 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 18 | } 19 | buildFeatures { 20 | buildConfig = true 21 | } 22 | buildTypes { 23 | release { 24 | minifyEnabled false 25 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 26 | } 27 | } 28 | compileOptions { 29 | sourceCompatibility JavaVersion.VERSION_1_8 30 | targetCompatibility JavaVersion.VERSION_1_8 31 | } 32 | namespace 'lt.ffda.sourcherry' 33 | } 34 | 35 | dependencies { 36 | implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22")) 37 | implementation 'androidx.appcompat:appcompat:1.7.1' 38 | implementation 'com.google.android.material:material:1.12.0' 39 | implementation 'androidx.constraintlayout:constraintlayout:2.2.1' 40 | implementation 'androidx.drawerlayout:drawerlayout:1.2.0' 41 | implementation 'androidx.recyclerview:recyclerview:1.4.0' 42 | implementation 'androidx.recyclerview:recyclerview-selection:1.2.0' 43 | implementation 'androidx.activity:activity:1.10.1' 44 | implementation 'androidx.fragment:fragment:1.8.9' 45 | implementation 'androidx.lifecycle:lifecycle-viewmodel:2.9.2' 46 | implementation 'androidx.preference:preference:1.2.1' 47 | implementation 'ru.noties:jlatexmath-android:0.2.0' 48 | testImplementation 'junit:junit:4.13.2' 49 | androidTestImplementation 'androidx.test.ext:junit:1.3.0' 50 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0' 51 | implementation 'com.github.omicronapps:7-Zip-JBinding-4Android:Release-16.02-2.02' 52 | implementation 'me.jfenn.ColorPickerDialog:base:0.2.2' 53 | } -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/model/ScNodeContentText.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.model; 12 | 13 | import android.text.SpannableStringBuilder; 14 | 15 | public class ScNodeContentText implements ScNodeContent { 16 | private byte type; 17 | private SpannableStringBuilder content; 18 | 19 | /** 20 | * Constructor for ScNodeContent object that holds node content (or a part of it) 21 | * in StringBuilder object. It holds everything except tables of the node. 22 | * @param type 0 - text to set into TextView, 1 - table content 23 | * @param content node text content 24 | */ 25 | public ScNodeContentText(byte type, SpannableStringBuilder content) { 26 | this.type = type; 27 | this.content = content; 28 | } 29 | 30 | /** 31 | * Get node text content 32 | * @return node text content 33 | */ 34 | public SpannableStringBuilder getContent() { 35 | return this.content; 36 | } 37 | 38 | /** 39 | * Set node text content 40 | * @param content node text content 41 | */ 42 | public void setContent(SpannableStringBuilder content) { 43 | this.content = content; 44 | } 45 | 46 | @Override 47 | public byte getContentType() { 48 | return this.type; 49 | } 50 | 51 | @Override 52 | public void setContentType(byte type) { 53 | this.type = type; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/res/xml/preferences_general.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | 15 | 20 | 21 | 25 | 26 | 33 | 34 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_move_node_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 21 | 22 | 28 | 29 | 35 | 36 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/xml/preferences.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 18 | 19 | 24 | 25 | 30 | 31 | 35 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/menu/options_menu_node_content_fragment.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 13 | 18 | 20 | 23 | 27 | 30 | 33 | 36 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/spans/ClickableSpanFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.spans; 12 | 13 | import android.text.style.ClickableSpan; 14 | 15 | /** 16 | * Span used to detect clicks on attached file in node content 17 | */ 18 | public abstract class ClickableSpanFile extends ClickableSpan { 19 | private int newOffset; 20 | private String justification; 21 | 22 | /** 23 | * Get new offset of the element. It shows location where the element has to be inserted back 24 | * into the node content when it is being recreated. 25 | * @return element's offset 26 | */ 27 | public int getNewOffset() { 28 | return this.newOffset; 29 | } 30 | 31 | /** 32 | * Set new offset of the element. It has to be calculated using the location of the span in the 33 | * node content. 34 | * @param newOffset element's offset 35 | */ 36 | public void setNewOffset(int newOffset) { 37 | this.newOffset = newOffset; 38 | } 39 | 40 | /** 41 | * Get justification of the element 42 | * @return justification of the elements 43 | */ 44 | public String getJustification() { 45 | return this.justification; 46 | } 47 | 48 | /** 49 | * Set justification of the element 50 | * @param justification element's justification ("left", "right", "center", "fill") 51 | */ 52 | public void setJustification(String justification) { 53 | this.justification = justification; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/res/xml/preferences_database.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | 15 | 21 | 22 | 27 | 28 | 33 | 34 | 39 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/spans/ClickableSpanNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.spans; 12 | 13 | import android.text.style.ClickableSpan; 14 | 15 | /** 16 | * Span used to show link to another node 17 | * Holds additional values 18 | */ 19 | public abstract class ClickableSpanNode extends ClickableSpan { 20 | // Unique ID of the node to open when link is tapped 21 | private String nodeUniqueID; 22 | // Anchor name that view scrolls to. This value has no affect in SourCherry 23 | private String linkAnchorName; 24 | 25 | /** 26 | * Get anchor name that view has to scroll to when 27 | * linked node is opened 28 | * @return anchor name 29 | */ 30 | public String getLinkAnchorName() { 31 | return this.linkAnchorName; 32 | } 33 | 34 | /** 35 | * Set anchor name that view has to scroll to when 36 | * linked node is opened 37 | * @param linkAnchorName anchor name 38 | */ 39 | public void setLinkAnchorName(String linkAnchorName) { 40 | this.linkAnchorName = linkAnchorName; 41 | } 42 | 43 | /** 44 | * Get unique ID of the node the link leads to 45 | * @return unique ID of the node 46 | */ 47 | public String getNodeUniqueID() { 48 | return this.nodeUniqueID; 49 | } 50 | 51 | /** 52 | * Set unique ID of the node the link leads to 53 | * @param nodeUniqueID unique ID of the node 54 | */ 55 | public void setNodeUniqueID(String nodeUniqueID) { 56 | this.nodeUniqueID = nodeUniqueID; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/customUiElements/ScTableLayout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.customUiElements; 12 | 13 | import android.content.Context; 14 | import android.widget.TableLayout; 15 | 16 | public class ScTableLayout extends TableLayout { 17 | private String colWidths; 18 | private byte lightInterface; 19 | public ScTableLayout(Context context) { 20 | super(context); 21 | } 22 | 23 | /** 24 | * Getting what column widths should be used in CherryTree 25 | * @return comma separated values for each column. 0 - default value, otherwise - user set value 26 | */ 27 | public String getColWidths() { 28 | return colWidths; 29 | } 30 | 31 | /** 32 | * Setting what column widths should be used in CherryTree. This value has no effect in SourCherry 33 | * @param colWidths comma separated values for each column. 0 - default value, otherwise - user set value 34 | */ 35 | public void setColWidths(String colWidths) { 36 | this.colWidths = colWidths; 37 | } 38 | 39 | /** 40 | * Is table table using lightweight interface in CherryTree 41 | * @return 1 - if table using lightweight interface, 0 - otherwise 42 | */ 43 | public byte getLightInterface() { 44 | return this.lightInterface; 45 | } 46 | 47 | /** 48 | * Setting what interface should be used in CherryTree 49 | * @param light 1 - if table using lightweight interface, 0 - otherwise 50 | */ 51 | public void setLightInterface(byte light) { 52 | this.lightInterface = light; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground_monochrome.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/java/lt/ffda/sourcherry/utils/OrderedSwitch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of SourCherry. 3 | * 4 | * SourCherry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 5 | * 6 | * SourCherry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | * 8 | * You should have received a copy of the GNU General Public License along with SourCherry. If not, see . 9 | */ 10 | 11 | package lt.ffda.sourcherry.utils; 12 | 13 | /** 14 | * Enum for ordered/numbered list items 15 | */ 16 | public enum OrderedSwitch { 17 | FULL_STOP(46, "."), // First level ordered list item's mark 18 | RIGHT_PARENTHESIS(29, ")"), // Second level ordered list item's mark 19 | HYPHEN_MINUS(45, "-"), // Third level ordered list item's mark 20 | GREATER_THAN_SIGN(62, ">"); // Fourth level ordered list item's mark 21 | 22 | private final int code; 23 | private final String string; 24 | 25 | OrderedSwitch(int code, String string) { 26 | this.code = code; 27 | this.string = string; 28 | } 29 | 30 | /** 31 | * Returns unicode decimal code of the ordered list item 32 | * @return unicode decimal code 33 | */ 34 | public int getCode() { 35 | return code; 36 | } 37 | 38 | /** 39 | * Returns CharSequence value of ordered list item that can be used in replace method 40 | * @return CharSequence value of ordered list item 41 | */ 42 | public String getString() { 43 | return string; 44 | } 45 | 46 | /** 47 | * Returns ordered list item string value for a specific level. Ordered lists have 4 levels 48 | * @param level item's level 49 | * @return ordered list string item 50 | */ 51 | public static String getItemForLevel(int level) { 52 | switch (level) { 53 | case 1: 54 | return RIGHT_PARENTHESIS.string; 55 | case 2: 56 | return HYPHEN_MINUS.string; 57 | case 3: 58 | return GREATER_THAN_SIGN.string; 59 | default: 60 | return FULL_STOP.string; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_imported_databases.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 20 | 21 |