├── settings.gradle
├── fastlane
└── metadata
│ └── android
│ ├── de
│ └── short_description.txt
│ ├── en-US
│ ├── short_description.txt
│ ├── images
│ │ └── icon.png
│ └── full_description.txt
│ └── it
│ ├── short_description.txt
│ └── full_description.txt
├── app
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values-jv
│ │ │ │ └── strings.xml
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── icon.png
│ │ │ ├── drawable
│ │ │ │ ├── empty.xml
│ │ │ │ ├── icon_background.xml
│ │ │ │ ├── diagram_hearth.xml
│ │ │ │ ├── diagram_hearth_print.xml
│ │ │ │ ├── person_background.xml
│ │ │ │ ├── references_background.xml
│ │ │ │ ├── diagram_year_oval.xml
│ │ │ │ ├── person_background_partner.xml
│ │ │ │ ├── person_background_partner_print.xml
│ │ │ │ ├── person_border_male.xml
│ │ │ │ ├── person_border_female.xml
│ │ │ │ ├── button_text_color.xml
│ │ │ │ ├── person_border_undefined.xml
│ │ │ │ ├── popup_baloon.xml
│ │ │ │ ├── diagram_background.xml
│ │ │ │ ├── slug_background.xml
│ │ │ │ ├── generic_background.xml
│ │ │ │ ├── menu_alberi_sfondo.xml
│ │ │ │ ├── ruota_sfondo.xml
│ │ │ │ ├── button_background_color.xml
│ │ │ │ ├── product_background.xml
│ │ │ │ ├── menu_sfondo.xml
│ │ │ │ ├── line_above.xml
│ │ │ │ ├── link_underline.xml
│ │ │ │ ├── frecciona.xml
│ │ │ │ ├── piu.xml
│ │ │ │ ├── indicator.xml
│ │ │ │ ├── menu_persona.xml
│ │ │ │ ├── person_background_selected.xml
│ │ │ │ ├── menu_tempio.xml
│ │ │ │ ├── ex.xml
│ │ │ │ ├── sort.xml
│ │ │ │ ├── menu_fonte.xml
│ │ │ │ ├── triangle_cap.xml
│ │ │ │ ├── popup_fiato.xml
│ │ │ │ ├── defunto.xml
│ │ │ │ ├── thumb.xml
│ │ │ │ ├── triangle_tab.xml
│ │ │ │ ├── title_background.xml
│ │ │ │ ├── magnifier.xml
│ │ │ │ ├── menu_lista.xml
│ │ │ │ ├── menu_ritratto.xml
│ │ │ │ ├── menu_autore.xml
│ │ │ │ ├── menu_nota.xml
│ │ │ │ ├── hamburger.xml
│ │ │ │ ├── questionmark.xml
│ │ │ │ ├── note_background.xml
│ │ │ │ ├── menu_diagramma.xml
│ │ │ │ ├── menu_famiglia.xml
│ │ │ │ ├── gear.xml
│ │ │ │ ├── image.xml
│ │ │ │ └── file_icon.xml
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── tags.xml
│ │ │ │ └── colors.xml
│ │ │ ├── xml
│ │ │ │ ├── backup_rules.xml
│ │ │ │ ├── provider_paths.xml
│ │ │ │ └── locales_config.xml
│ │ │ ├── drawable-night
│ │ │ │ ├── diagram_year_oval.xml
│ │ │ │ ├── diagram_background.xml
│ │ │ │ ├── ruota_sfondo.xml
│ │ │ │ └── product_background.xml
│ │ │ ├── layout
│ │ │ │ ├── crop_image_activity.xml
│ │ │ │ ├── progress.xml
│ │ │ │ ├── diagram_button.xml
│ │ │ │ ├── diagram_asterisk.xml
│ │ │ │ ├── launcher_activity.xml
│ │ │ │ ├── pezzo_bava.xml
│ │ │ │ ├── menu_item_extra.xml
│ │ │ │ ├── merge_activity.xml
│ │ │ │ ├── switch_layout.xml
│ │ │ │ ├── file_activity.xml
│ │ │ │ ├── profile_page_fragment.xml
│ │ │ │ ├── diagram_minicard.xml
│ │ │ │ ├── fab.xml
│ │ │ │ ├── crop_image_dialog.xml
│ │ │ │ ├── barra_edita.xml
│ │ │ │ ├── scrollview_item.xml
│ │ │ │ ├── backup_recover_fragment.xml
│ │ │ │ ├── media_file.xml
│ │ │ │ ├── image_layout.xml
│ │ │ │ ├── tree_title_dialog.xml
│ │ │ │ ├── scrollview.xml
│ │ │ │ ├── id_editor.xml
│ │ │ │ ├── fabuloso.xml
│ │ │ │ ├── source_item.xml
│ │ │ │ ├── name_editor.xml
│ │ │ │ ├── family_layout.xml
│ │ │ │ ├── piece_app.xml
│ │ │ │ ├── popup.xml
│ │ │ │ ├── recyclerview.xml
│ │ │ │ ├── backup_save_fragment.xml
│ │ │ │ ├── trees_activity.xml
│ │ │ │ ├── source_citation_layout.xml
│ │ │ │ ├── cabinet_layout.xml
│ │ │ │ ├── merge_tree_layout.xml
│ │ │ │ ├── change_date_layout.xml
│ │ │ │ ├── note_layout.xml
│ │ │ │ ├── notes_item.xml
│ │ │ │ ├── source_layout.xml
│ │ │ │ ├── trees_bar.xml
│ │ │ │ ├── activity_detail.xml
│ │ │ │ ├── file_info_dialog.xml
│ │ │ │ ├── media_folders_activity.xml
│ │ │ │ ├── tree_view.xml
│ │ │ │ ├── purchase_activity.xml
│ │ │ │ ├── media_folder_item.xml
│ │ │ │ ├── media_layout.xml
│ │ │ │ ├── profile_facts_item.xml
│ │ │ │ ├── confirmation_activity.xml
│ │ │ │ ├── diagram_fragment.xml
│ │ │ │ ├── compare_activity.xml
│ │ │ │ ├── main_activity.xml
│ │ │ │ ├── event_item.xml
│ │ │ │ ├── progress_view.xml
│ │ │ │ ├── profile_relatives_title.xml
│ │ │ │ ├── families_item.xml
│ │ │ │ ├── backup_activity.xml
│ │ │ │ ├── new_relative_dialog.xml
│ │ │ │ ├── about_activity.xml
│ │ │ │ ├── profile_relatives_group.xml
│ │ │ │ ├── banner_layout.xml
│ │ │ │ ├── compare_card.xml
│ │ │ │ ├── small_person_layout.xml
│ │ │ │ └── merge_choice_fragment.xml
│ │ │ ├── drawable-ldrtl
│ │ │ │ └── menu_alberi_sfondo.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ └── icon.xml
│ │ │ ├── menu
│ │ │ │ ├── switcher.xml
│ │ │ │ ├── sort_by.xml
│ │ │ │ ├── search.xml
│ │ │ │ └── main_menu.xml
│ │ │ ├── values-el
│ │ │ │ └── strings.xml
│ │ │ ├── values-ti
│ │ │ │ └── strings.xml
│ │ │ ├── values-night
│ │ │ │ └── colors.xml
│ │ │ ├── navigation
│ │ │ │ └── merge_nav_graph.xml
│ │ │ └── xml-v35
│ │ │ │ └── locales_config.xml
│ │ ├── icon-web.png
│ │ └── java
│ │ │ └── app
│ │ │ └── familygem
│ │ │ ├── merge
│ │ │ ├── Enum.kt
│ │ │ ├── BaseFragment.kt
│ │ │ └── MergeActivity.kt
│ │ │ ├── constant
│ │ │ ├── Destination.kt
│ │ │ ├── Image.kt
│ │ │ ├── Choice.java
│ │ │ ├── FileType.kt
│ │ │ ├── Relation.java
│ │ │ ├── Kind.java
│ │ │ ├── Json.java
│ │ │ ├── Type.kt
│ │ │ ├── Format.java
│ │ │ ├── Extra.kt
│ │ │ ├── Status.java
│ │ │ └── Gender.java
│ │ │ ├── util
│ │ │ ├── SubmitterUtil.kt
│ │ │ ├── NameUtil.kt
│ │ │ ├── AddressUtil.kt
│ │ │ ├── RepositoryUtil.kt
│ │ │ ├── SexUtil.kt
│ │ │ └── SourceUtil.kt
│ │ │ ├── Logger.java
│ │ │ ├── Extension.java
│ │ │ ├── BaseActivity.java
│ │ │ ├── visitor
│ │ │ ├── CleanStack.java
│ │ │ ├── NoteList.java
│ │ │ ├── NoteContainers.java
│ │ │ ├── MediaContainers.java
│ │ │ ├── MediaContainersGuarded.java
│ │ │ ├── NoteContainersGuarded.java
│ │ │ ├── NoteReferences.java
│ │ │ ├── CountSourceCitations.java
│ │ │ ├── MediaLeaders.kt
│ │ │ ├── MediaReferences.java
│ │ │ ├── ListOfSourceCitations.java
│ │ │ └── TotalVisitor.java
│ │ │ ├── purchase
│ │ │ └── PurchaseActivity.kt
│ │ │ ├── AboutActivity.java
│ │ │ ├── ElasticTextView.kt
│ │ │ ├── TimePickerFragment.kt
│ │ │ ├── detail
│ │ │ ├── ChangeActivity.java
│ │ │ ├── ExtensionActivity.java
│ │ │ ├── SubmitterActivity.java
│ │ │ ├── NoteActivity.java
│ │ │ ├── AddressActivity.java
│ │ │ ├── RepositoryRefActivity.java
│ │ │ ├── RepositoryActivity.java
│ │ │ └── SourceCitationActivity.java
│ │ │ ├── profile
│ │ │ └── BaseFragment.kt
│ │ │ ├── DatePickerFragment.kt
│ │ │ ├── SpeechBubble.java
│ │ │ ├── ProgressView.kt
│ │ │ ├── share
│ │ │ └── Comparison.java
│ │ │ └── NotifyReceiver.java
│ └── androidTest
│ │ └── assets
│ │ ├── anna.webp
│ │ ├── È Carmelo.pdf
│ │ └── media.ged
├── libs
│ ├── geonames-1.1.15.jar
│ └── gedcomgraph-3.10.jar
└── proguard-rules.pro
├── gradle.properties
├── .gitignore
└── .idea
└── codeStyles
└── codeStyleConfig.xml
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/de/short_description.txt:
--------------------------------------------------------------------------------
1 | Erstelle Deinen eigenen Stammbaum
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | Create your own family tree
--------------------------------------------------------------------------------
/fastlane/metadata/android/it/short_description.txt:
--------------------------------------------------------------------------------
1 | Crea il tuo albero genealogico
--------------------------------------------------------------------------------
/app/src/main/res/values-jv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/icon-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelesalvador/FamilyGem/HEAD/app/src/main/icon-web.png
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | android.useAndroidX=true
2 | android.enableJetifier=true
3 | org.gradle.jvmargs=-Xmx2048M
4 |
--------------------------------------------------------------------------------
/app/libs/geonames-1.1.15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelesalvador/FamilyGem/HEAD/app/libs/geonames-1.1.15.jar
--------------------------------------------------------------------------------
/app/libs/gedcomgraph-3.10.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelesalvador/FamilyGem/HEAD/app/libs/gedcomgraph-3.10.jar
--------------------------------------------------------------------------------
/app/src/androidTest/assets/anna.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelesalvador/FamilyGem/HEAD/app/src/androidTest/assets/anna.webp
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle/
2 | .idea/*
3 | !.idea/codeStyles/
4 | build/
5 | app/libs-source-data/
6 | credential.properties
7 | local.properties
8 |
--------------------------------------------------------------------------------
/app/src/androidTest/assets/È Carmelo.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelesalvador/FamilyGem/HEAD/app/src/androidTest/assets/È Carmelo.pdf
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelesalvador/FamilyGem/HEAD/app/src/main/res/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelesalvador/FamilyGem/HEAD/fastlane/metadata/android/en-US/images/icon.png
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/merge/Enum.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.merge
2 |
3 | enum class Will { NONE, KEEP, MERGE }
4 |
5 | enum class State { QUIET, ACTIVE, RESET, COMPLETE }
6 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 80dp
4 | 70dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_background.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Destination.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.constant
2 |
3 | /** More info on something that is going to be created. */
4 | enum class Destination {
5 | SIMPLE_MEDIA,
6 | SHARED_MEDIA
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/diagram_hearth.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/diagram_hearth_print.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/person_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/references_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/diagram_year_oval.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/person_background_partner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/person_background_partner_print.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/person_border_male.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-night/diagram_year_oval.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/person_border_female.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Image.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.constant
2 |
3 | import app.familygem.util.FileUtil
4 |
5 | /** Some bitwise options for [FileUtil.selectMainImage] and [FileUtil.showImage]. */
6 | object Image {
7 | const val DARK = 0b1
8 | const val BLUR = 0b10
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_text_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/person_border_undefined.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/popup_baloon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/diagram_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/slug_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/crop_image_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-night/diagram_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/generic_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldrtl/menu_alberi_sfondo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_alberi_sfondo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ruota_sfondo.xml:
--------------------------------------------------------------------------------
1 |
4 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-night/ruota_sfondo.xml:
--------------------------------------------------------------------------------
1 |
4 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_background_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/product_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-night/product_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_sfondo.xml:
--------------------------------------------------------------------------------
1 |
4 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/line_above.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/link_underline.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/frecciona.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/piu.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/switcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Choice.java:
--------------------------------------------------------------------------------
1 | package app.familygem.constant;
2 |
3 | public class Choice {
4 | public static final String PERSON = "choosePerson";
5 | public static final String MEDIA = "chooseMedia";
6 | public static final String NOTE = "chooseNote";
7 | public static final String SOURCE = "chooseSource";
8 | public static final String REPOSITORY = "chooseRepo";
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/indicator.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_persona.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/person_background_selected.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/diagram_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_tempio.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ex.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/sort_by.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/util/SubmitterUtil.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.util
2 |
3 | import app.familygem.R
4 | import app.familygem.util.Util.string
5 | import org.folg.gedcom.model.Submitter
6 |
7 | fun Submitter.writeName(): String {
8 | var name = name
9 | if (name == null) name = "[${string(R.string.no_name)}]"
10 | else if (name.isEmpty()) name = "[${string(R.string.empty_name)}]"
11 | return name
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/FileType.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.constant
2 |
3 | import app.familygem.util.FileUtil
4 |
5 | /** Some file types that can be exported, with their MIME type. */
6 | enum class FileType(val mimeType: String) {
7 | PNG("image/png"),
8 | PDF("application/pdf"),
9 | ZIP_BACKUP("application/zip"),
10 | GEDCOM(FileUtil.gedcomMimeTypes[0]),
11 | ZIPPED_GEDCOM("application/zip")
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/sort.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_fonte.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/triangle_cap.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/popup_fiato.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/defunto.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/thumb.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/triangle_tab.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/diagram_asterisk.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/title_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/launcher_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/magnifier.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/Logger.java:
--------------------------------------------------------------------------------
1 | package app.familygem;
2 |
3 | import android.util.Log;
4 |
5 | public class Logger {
6 |
7 | /**
8 | * Logs everything with "mine" tag.
9 | */
10 | public static void l(Object... objects) {
11 | StringBuilder builder = new StringBuilder();
12 | for (Object object : objects)
13 | builder.append(object).append(" ");
14 | Log.v("mine", builder.toString());
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values/tags.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_lista.xml:
--------------------------------------------------------------------------------
1 |
8 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/pezzo_bava.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_ritratto.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/search.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/Extension.java:
--------------------------------------------------------------------------------
1 | package app.familygem;
2 |
3 | import org.folg.gedcom.model.GedcomTag;
4 |
5 | /**
6 | * Represents the name and text of an extension.
7 | */
8 | public class Extension {
9 | public String name;
10 | public String text;
11 | public GedcomTag gedcomTag;
12 |
13 | public Extension(String name, String text, GedcomTag gedcomTag) {
14 | this.name = name;
15 | this.text = text;
16 | this.gedcomTag = gedcomTag;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/menu_item_extra.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_autore.xml:
--------------------------------------------------------------------------------
1 |
6 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_nota.xml:
--------------------------------------------------------------------------------
1 |
6 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/merge_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Relation.java:
--------------------------------------------------------------------------------
1 | package app.familygem.constant;
2 |
3 | public enum Relation {
4 | PARENT, SIBLING, HALF_SIBLING, PARTNER, CHILD;
5 |
6 | public static Relation get(int num) {
7 | switch (num) {
8 | case 0:
9 | return PARENT;
10 | case 1:
11 | return SIBLING;
12 | case 2:
13 | return PARTNER;
14 | case 3:
15 | return CHILD;
16 | }
17 | return null;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Kind.java:
--------------------------------------------------------------------------------
1 | package app.familygem.constant;
2 |
3 | /**
4 | * GEDCOM date types.
5 | */
6 | public enum Kind {
7 |
8 | EXACT(""),
9 | APPROXIMATE("ABT"), CALCULATED("CAL"), ESTIMATED("EST"),
10 | AFTER("AFT"), BEFORE("BEF"), BETWEEN_AND("BET"),
11 | FROM("FROM"), TO("TO"), FROM_TO("FROM"),
12 | PHRASE("("); // TODO: Manage also the "INT" (interpreted) prefix.
13 |
14 | public final String prefix;
15 |
16 | Kind(String prefix) {
17 | this.prefix = prefix;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/util/NameUtil.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.util
2 |
3 | import app.familygem.Global
4 | import app.familygem.R
5 | import app.familygem.TypeView
6 | import org.folg.gedcom.model.Name
7 |
8 | /** Composes the title of a name fact, optionally adding the type. */
9 | fun Name.writeTitle(): String {
10 | var txt = Global.context.getString(R.string.name)
11 | if (type != null && type.isNotEmpty()) {
12 | txt += " (${TypeView.getTranslatedType(type, TypeView.Combo.NAME)})"
13 | }
14 | return txt
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Json.java:
--------------------------------------------------------------------------------
1 | package app.familygem.constant;
2 |
3 | /**
4 | * Names inside the JSON coming from the server.
5 | */
6 | public class Json {
7 | public static final String FTP = "ftp";
8 | public static final String HOST = "host";
9 | public static final String PORT = "port";
10 | public static final String USER = "user";
11 | public static final String PASSWORD = "password";
12 | public static final String SHARED_PATH = "sharedPath";
13 | public static final String GEO_NAMES = "geoNames";
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/hamburger.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/questionmark.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/note_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 | -
11 |
12 |
13 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_diagramma.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/switch_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/file_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu_famiglia.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Είσαι σίγουρος?
4 | Ακύρωση
5 | Τέλος
6 | Αλλαγή ημερομηνίας
7 | Το URI που λήφθηκε δεν έγινε κατανοητό.
8 | Δημιούργησε το δικό σου οικογενειακό δέντρο
9 | Διαγραφή
10 | Κάτι πήγε στραβά.
11 | Έκδοση %s
12 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/full_description.txt:
--------------------------------------------------------------------------------
1 | Family Gem is a free app for Android that let you create complete genealogical trees.
2 |
3 | With Family Gem you can:
4 |
5 | * Create a family tree from scratch, entering names, dates, places, events, photos and sources.
6 | * Import an existing family tree through a GEDCOM file and modify it as you like.
7 | * Export the family tree you created (via GEDCOM again) to every other genealogy program.
8 | * Share a tree with your relatives, letting them improve it and receiving back the updates.
9 |
10 | For help, first head over to the wiki pages.
11 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package app.familygem;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.appcompat.app.AppCompatActivity;
6 |
7 | public class BaseActivity extends AppCompatActivity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 |
13 | // Updates activity title when one in-app language is selected
14 | try {
15 | int title = getPackageManager().getActivityInfo(getComponentName(), 0).labelRes;
16 | if (title != 0) setTitle(title);
17 | } catch (Exception ignored) {
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/visitor/CleanStack.java:
--------------------------------------------------------------------------------
1 | package app.familygem.visitor;
2 |
3 | import org.folg.gedcom.model.ExtensionContainer;
4 |
5 | /**
6 | * Closely connected to {@link FindStack}, locates in the stack the objects to keep or delete.
7 | */
8 | class CleanStack extends TotalVisitor {
9 |
10 | private Object target;
11 | boolean toDelete = true;
12 |
13 | CleanStack(Object target) {
14 | this.target = target;
15 | }
16 |
17 | @Override
18 | boolean visit(ExtensionContainer object, boolean isLeader) { // The boolean is unused here
19 | if (object.equals(target))
20 | toDelete = false;
21 | return true;
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/it/full_description.txt:
--------------------------------------------------------------------------------
1 | Family Gem è un'app gratutita per Android che ti consente di creare alberi genealogici completi.
2 |
3 | Con Family Gem puoi:
4 |
5 | * Creare un albero genealogico da zero, inserendo nomi, date, luoghi, eventi, foto e fonti.
6 | * Importare un albero esistente attraverso un file GEDCOM e modificarlo come preferisci.
7 | * Esportare l'albero che hai creato (sempre tramite GEDCOM) in qualsiasi altro programma genealogico.
8 | * Condividere un albero con i tuoi parenti, lasciando che lo arrichiscano e ricevendo indietro gli aggiornamenti.
9 |
10 | Per un aiuto, prima dai un'occhiata alle pagine wiki.
11 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Type.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.constant
2 |
3 | import app.familygem.util.FileUtil
4 |
5 | /** Possible file types resulting by [FileUtil.showImage]. */
6 | enum class Type {
7 | /** Initial value. */
8 | NONE,
9 |
10 | /** Croppable image. */
11 | CROPPABLE,
12 |
13 | /** Not croppable video preview. */
14 | VIDEO,
15 |
16 | /** Not croppable PDF preview. */
17 | PDF,
18 |
19 | /** Generic file icon. */
20 | DOCUMENT,
21 |
22 | /** Image with preview from the web. */
23 | WEB_IMAGE,
24 |
25 | /** Anything else from the web. */
26 | WEB_ANYTHING,
27 |
28 | /** File failed loading. */
29 | PLACEHOLDER
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/profile_page_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/diagram_minicard.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fab.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/crop_image_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Format.java:
--------------------------------------------------------------------------------
1 | package app.familygem.constant;
2 |
3 | /**
4 | * All of the formats a Date can be displayed as.
5 | */
6 | public class Format {
7 | public static final String[] PATTERNS = {"d MMM yyy", "d M yyy", "MMM yyy", "M yyy", "d MMM", "yyy", ""};
8 | public static final String D_M_Y = PATTERNS[0]; // 31 JAN 2000
9 | public static final String D_m_Y = PATTERNS[1]; // 31 1 2000
10 | public static final String M_Y = PATTERNS[2]; // JAN 2000
11 | public static final String m_Y = PATTERNS[3]; // 1 2000
12 | public static final String D_M = PATTERNS[4]; // 31 JAN
13 | public static final String Y = PATTERNS[5]; // 2000
14 | public static final String OTHER = PATTERNS[6]; // Any empty or invalid date
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/barra_edita.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/scrollview_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
14 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/backup_recover_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/purchase/PurchaseActivity.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.purchase
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import app.familygem.R
6 | import app.familygem.constant.Extra
7 |
8 | /**
9 | * Here the user can buy Family Gem Premium to activate some premium feature.
10 | */
11 | class PurchaseActivity : AppCompatActivity() {
12 | override fun onCreate(savedInstanceState: Bundle?) {
13 | super.onCreate(savedInstanceState)
14 | setContentView(R.layout.purchase_activity)
15 | supportActionBar!!.setDisplayHomeAsUpEnabled(true)
16 | setTitle(intent.getIntExtra(Extra.STRING, 0))
17 | }
18 |
19 | // Back arrow on actionbar
20 | override fun onSupportNavigateUp(): Boolean {
21 | onBackPressedDispatcher.onBackPressed()
22 | return super.onSupportNavigateUp()
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/androidTest/assets/media.ged:
--------------------------------------------------------------------------------
1 | 0 HEAD
2 | 1 GEDC
3 | 2 VERS 5.5.1
4 | 2 FORM LINEAGE-LINKED
5 | 1 CHAR UTF-8
6 | 0 @I1@ INDI
7 | 1 NAME Person /With Some Media/
8 | 1 SEX M
9 | 1 OBJE
10 | 2 TITL PDF in the external storage to be accessed with a direct path
11 | 2 FILE È Carmelo.pdf
12 | 1 OBJE
13 | 2 TITL Text file to access with direct path
14 | 2 FILE path.txt
15 | 1 OBJE
16 | 2 TITL Same file
17 | 2 FILE path.txt
18 | 2 NOTE Duplicate files must be avoided, especially because the ZIP becomes invalid.
19 | 1 OBJE
20 | 2 TITL First homonym
21 | 2 FILE first/homonym.txt
22 | 1 OBJE
23 | 2 TITL Second homonym
24 | 2 FILE second/homonym.txt
25 | 2 NOTE Here too, duplicate names must be avoided.
26 | 1 OBJE
27 | 2 TITL Text file to access with URI
28 | 2 FILE uri.txt
29 | 1 OBJE
30 | 2 TITL Image in SD card to access with URI
31 | 2 FILE anna.webp
32 | 2 NOTE Only some devices have an SD card.
33 | 0 TRLR
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/media_file.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/image_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/AboutActivity.java:
--------------------------------------------------------------------------------
1 | package app.familygem;
2 |
3 | import android.content.Intent;
4 | import android.net.Uri;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.TextView;
8 |
9 | public class AboutActivity extends BaseActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle bundle) {
13 | super.onCreate(bundle);
14 | setContentView(R.layout.about_activity);
15 |
16 | TextView version = findViewById(R.id.about_version);
17 | version.setText(getString(R.string.version_name, BuildConfig.VERSION_NAME));
18 |
19 | TextView webSite = findViewById(R.id.about_link);
20 | if (Global.settings.premium)
21 | webSite.setOnClickListener(view -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.familygem.app"))));
22 | else
23 | webSite.setVisibility(View.GONE);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gear.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | -keepclassmembernames class app.familygem.Settings, app.familygem.Settings$Tree, app.familygem.Settings$DiagramSettings,
2 | app.familygem.Settings$TreeSettings, app.familygem.Settings$ZippedTree, app.familygem.Settings$Share { *; }
3 | -keepclassmembers class org.folg.gedcom.model.* { *; }
4 | -keepattributes LineNumberTable,SourceFile # To have the correct line numbers in Android Vitals
5 | # Suppresses apparently useless warnings
6 | -dontwarn org.joda.convert.FromString
7 | -dontwarn org.joda.convert.ToString
8 | -dontwarn org.slf4j.impl.StaticLoggerBinder
9 |
10 | -keep class org.apache.xerces.** { *; } # Required by GeoNames to display suggestions of PlaceFinderTextView
11 | # Warnings derived by using xerces:xercesImpl
12 | -dontwarn org.apache.xml.resolver.Catalog
13 | -dontwarn org.apache.xml.resolver.CatalogManager
14 | -dontwarn org.apache.xml.resolver.readers.CatalogReader
15 | -dontwarn org.apache.xml.resolver.readers.SAXCatalogReader
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ti/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ርግጸኛ ዲኻ\?
4 | መዓልቲ ቐይር
5 | ጭራ
6 | መጣቐሲታት
7 | ቑፅሪ ፍልፍላት
8 | ኦማት
9 | ፍልፍላት
10 | መዘኻኸሪታት
11 | ፍጠር
12 | ኦም
13 | ሰባት
14 | ኣውርድ
15 | ኣቐምጥ
16 | ክፈት
17 | ናይሓባር
18 | ደምስስ
19 | ግደፍ
20 | ስእል ሕንፃፅ
21 | ዓቛሪ ዳታ
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/tree_title_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/scrollview.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
19 |
20 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/util/AddressUtil.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.util
2 |
3 | import org.folg.gedcom.model.Address
4 |
5 | /**
6 | * Writes the address concatenating all fields.
7 | * @param singleLine Comma-separated single line or multi-line
8 | */
9 | fun Address.toString(singleLine: Boolean): String {
10 | var txt = ""
11 | val br = if (singleLine) ", " else "\n"
12 | if (value != null) txt = value + br
13 | if (addressLine1 != null) txt += addressLine1 + br
14 | if (addressLine2 != null) txt += addressLine2 + br
15 | if (addressLine3 != null) txt += addressLine3 + br
16 | if (postalCode != null || city != null || state != null) {
17 | if (postalCode != null) txt += "$postalCode "
18 | if (city != null) txt += "$city "
19 | if (state != null) txt += state
20 | txt = txt.trim() + br
21 | }
22 | if (country != null) txt += country
23 | if (txt.endsWith(br)) txt = txt.substring(0, txt.length - br.length)
24 | return txt
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/id_editor.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
14 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fabuloso.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
20 |
26 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/visitor/NoteList.java:
--------------------------------------------------------------------------------
1 | package app.familygem.visitor;
2 |
3 | import org.folg.gedcom.model.ExtensionContainer;
4 | import org.folg.gedcom.model.Note;
5 | import org.folg.gedcom.model.NoteContainer;
6 | import org.folg.gedcom.model.Repository;
7 | import org.folg.gedcom.model.Source;
8 |
9 | import java.util.ArrayList;
10 | import java.util.List;
11 |
12 | import app.familygem.Global;
13 |
14 | /**
15 | * Visitor collecting a list of inline (not shared) notes.
16 | */
17 | public class NoteList extends TotalVisitor {
18 |
19 | public List noteList = new ArrayList<>();
20 |
21 | @Override
22 | boolean visit(ExtensionContainer object, boolean isLeader) {
23 | if (object instanceof NoteContainer
24 | && !(!Global.settings.expert && (object instanceof Source || object instanceof Repository))) {
25 | NoteContainer container = (NoteContainer)object;
26 | noteList.addAll(container.getNotes());
27 | }
28 | return true;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/source_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
23 |
24 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/name_editor.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/family_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/piece_app.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
16 |
24 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/image.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
8 |
13 |
14 |
15 | -
16 |
17 |
20 |
21 |
22 |
23 | -
24 |
25 |
26 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
23 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/recyclerview.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
19 |
20 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/backup_save_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
17 |
18 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/trees_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
18 |
19 |
20 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #720426
4 | #4C0219
5 | #960f3e
6 | #DD7803
7 | #AA6009
8 | #7C4901
9 | #000
10 | #222
11 | #BB000000
12 | #FFF
13 | #AAA
14 | #AAFFFFFF
15 | #666
16 | #FF0059
17 | #555
18 | #66000000
19 | #111
20 | #DDD
21 | #884B00
22 | #B17000
23 | #49423B
24 | #7C7369
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/source_citation_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
17 |
18 |
23 |
24 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/ElasticTextView.kt:
--------------------------------------------------------------------------------
1 | package app.familygem
2 |
3 | import android.content.Context
4 | import android.text.Layout
5 | import android.util.AttributeSet
6 | import androidx.appcompat.widget.AppCompatTextView
7 | import kotlin.math.ceil
8 |
9 | /**
10 | * TextView that shrinks correctly the width even when contains multiple lines.
11 | */
12 | class ElasticTextView(context: Context, attrs: AttributeSet?) : AppCompatTextView(context, attrs) {
13 |
14 | override fun onMeasure(widthSpec: Int, heightSpec: Int) {
15 | var widthSpec = widthSpec
16 | val layout = layout
17 | if (layout != null) {
18 | val maxWidth = ceil(getMaxLineWidth(layout).toDouble()).toInt()
19 | widthSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST)
20 | }
21 | super.onMeasure(widthSpec, heightSpec)
22 | }
23 |
24 | private fun getMaxLineWidth(layout: Layout): Float {
25 | var maxWidth = 0f
26 | for (i in 0 until layout.lineCount) {
27 | if (layout.getLineWidth(i) > maxWidth) {
28 | maxWidth = layout.getLineWidth(i)
29 | }
30 | }
31 | return maxWidth
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/merge/BaseFragment.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.merge
2 |
3 | import android.view.View
4 | import android.widget.ImageButton
5 | import android.widget.RelativeLayout
6 | import android.widget.TextView
7 | import androidx.core.content.res.ResourcesCompat
8 | import androidx.fragment.app.Fragment
9 | import androidx.fragment.app.activityViewModels
10 | import app.familygem.R
11 | import app.familygem.Settings.Tree
12 | import app.familygem.U
13 | import app.familygem.util.getBasicData
14 |
15 | open class BaseFragment(layout: Int) : Fragment(layout) {
16 |
17 | val model: MergeViewModel by activityViewModels()
18 |
19 | fun setupTreeView(treeView: View, tree: Tree) {
20 | treeView.background = ResourcesCompat.getDrawable(resources, R.drawable.generic_background, null)
21 | val layout = treeView.findViewById(R.id.tree_layout)
22 | layout.setPadding(U.dpToPx(15f), U.dpToPx(5f), U.dpToPx(15f), U.dpToPx(7f))
23 | layout.findViewById(R.id.tree_title).text = tree.title
24 | layout.findViewById(R.id.tree_data).text = tree.getBasicData()
25 | layout.findViewById(R.id.tree_menu).visibility = View.GONE
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Extra.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.constant
2 |
3 | import app.familygem.BuildConfig
4 |
5 | /** Strings to convey the extras. */
6 | object Extra {
7 | private const val PREFIX = BuildConfig.APPLICATION_ID // Package prefix
8 |
9 | const val ALONE = "$PREFIX.alone"
10 | const val AUTO_LOAD_TREE = "$PREFIX.autoLoadTree"
11 | const val DATE_ID = "$PREFIX.dateId"
12 | const val DESTINATION = "$PREFIX.destination"
13 | const val FAMILY_ID = "$PREFIX.familyId"
14 | const val FROM_FAMILY = "$PREFIX.fromFamilyActivity"
15 | const val ID = "$PREFIX.id"
16 | const val MEDIA_ID = "$PREFIX.mediaId"
17 | const val NOTE_ID = "$PREFIX.noteId"
18 | const val PAGE = "$PREFIX.page"
19 | const val PERSON_ID = "$PREFIX.personId"
20 | const val POSITION = "$PREFIX.position"
21 | const val RELATION = "$PREFIX.relation"
22 | const val RELATIVE_ID = "$PREFIX.relativeId"
23 | const val SOURCE_ID = "$PREFIX.sourceId"
24 | const val STRING = "$PREFIX.string"
25 | const val TEXT = "$PREFIX.text"
26 | const val TITLE = "$PREFIX.title"
27 | const val TREE_ID = "$PREFIX.treeId"
28 | const val TREE_ID_2 = "$PREFIX.treeId2"
29 | const val TYPE = "$PREFIX.type"
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/cabinet_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
21 |
22 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/merge_tree_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
23 |
24 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/change_date_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
24 |
25 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/util/RepositoryUtil.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.util
2 |
3 | import android.content.Intent
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.widget.LinearLayout
7 | import android.widget.TextView
8 | import androidx.cardview.widget.CardView
9 | import androidx.core.content.res.ResourcesCompat
10 | import app.familygem.Memory
11 | import app.familygem.R
12 | import app.familygem.detail.RepositoryActivity
13 | import org.folg.gedcom.model.Repository
14 |
15 | object RepositoryUtil {
16 |
17 | /**
18 | * Creates into layout a clickable repository and returns the created view.
19 | */
20 | fun placeRepository(layout: LinearLayout, repo: Repository): View {
21 | val context = layout.context
22 | val repoView = LayoutInflater.from(context).inflate(R.layout.source_layout, layout, false)
23 | layout.addView(repoView)
24 | repoView.findViewById(R.id.source_text).text = repo.name
25 | (repoView as CardView).setCardBackgroundColor(ResourcesCompat.getColor(context.resources, R.color.repository, null))
26 | repoView.setOnClickListener {
27 | Memory.setLeader(repo)
28 | context.startActivity(Intent(context, RepositoryActivity::class.java))
29 | }
30 | return repoView
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/TimePickerFragment.kt:
--------------------------------------------------------------------------------
1 | package app.familygem
2 |
3 | import android.app.Dialog
4 | import android.app.TimePickerDialog
5 | import android.os.Bundle
6 | import android.text.format.DateFormat
7 | import android.widget.TimePicker
8 | import androidx.fragment.app.DialogFragment
9 | import org.joda.time.LocalTime
10 | import org.joda.time.format.DateTimeFormat
11 |
12 | class TimePickerFragment(private val settingsActivity: SettingsActivity) : DialogFragment(), TimePickerDialog.OnTimeSetListener {
13 |
14 | override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
15 | // Uses the settings time as the default values for the picker
16 | val time = Global.settings.notifyTime.split(":")
17 | return TimePickerDialog(activity, this, time[0].toInt(), time[1].toInt(), DateFormat.is24HourFormat(activity))
18 | }
19 |
20 | override fun onTimeSet(view: TimePicker, hourOfDay: Int, minute: Int) {
21 | // Hours are returned in 24 format, also for AM/PM picker
22 | val localTime = LocalTime(hourOfDay, minute)
23 | val format = DateTimeFormat.forPattern("HH:mm")
24 | Global.settings.notifyTime = localTime.toString(format) // Notifier will save settings
25 | settingsActivity.writeNotifyTime()
26 | Notifier(context, null, 0, Notifier.What.UPDATE)
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/note_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
20 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/notes_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
26 |
27 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/source_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
24 |
25 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/detail/ChangeActivity.java:
--------------------------------------------------------------------------------
1 | package app.familygem.detail;
2 |
3 | import android.view.Menu;
4 |
5 | import org.folg.gedcom.model.Change;
6 | import org.folg.gedcom.model.DateTime;
7 |
8 | import app.familygem.DetailActivity;
9 | import app.familygem.R;
10 | import app.familygem.U;
11 | import app.familygem.util.NoteUtil;
12 |
13 | /**
14 | * Detail of the change date and time of a record.
15 | * Date and time can't be edited here, as they are automatically updated on saving the tree.
16 | */
17 | public class ChangeActivity extends DetailActivity {
18 |
19 | Change change;
20 |
21 | @Override
22 | protected void format() {
23 | setTitle(R.string.change_date);
24 | placeSlug("CHAN");
25 | change = (Change)cast(Change.class);
26 | DateTime dateTime = change.getDateTime();
27 | if (dateTime != null) {
28 | if (dateTime.getValue() != null)
29 | U.place(box, getString(R.string.value), dateTime.getValue());
30 | if (dateTime.getTime() != null)
31 | U.place(box, getString(R.string.time), dateTime.getTime());
32 | }
33 | placeExtensions(change);
34 | NoteUtil.INSTANCE.placeNotes(box, change);
35 | }
36 |
37 | // Options menu not needed
38 | @Override
39 | public boolean onCreateOptionsMenu(Menu menu) {
40 | return false;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/file_icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
8 |
9 |
12 |
13 |
14 | -
19 |
20 |
21 |
22 |
23 |
24 | -
29 |
30 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/navigation/merge_nav_graph.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
12 |
15 |
16 |
20 |
23 |
26 |
27 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/util/SexUtil.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.util
2 |
3 | import org.folg.gedcom.model.EventFact
4 | import org.folg.gedcom.model.Person
5 |
6 | /** [sexFact] comes already with the "SEX" tag, or it is completely null. */
7 | class SexUtil(private var sexFact: EventFact? = null) {
8 |
9 | val value = sexFact?.value
10 |
11 | fun isMale(): Boolean {
12 | return value == "M"
13 | }
14 |
15 | fun isFemale(): Boolean {
16 | return value == "F"
17 | }
18 |
19 | /** Sex value is either "M", "F" or something other than "U". */
20 | fun isDefined(): Boolean {
21 | return value == "M" || value == "F" || value != null && value != "U"
22 | }
23 |
24 | /** Sex event is null. */
25 | fun isMissing(): Boolean {
26 | return sexFact == null
27 | }
28 |
29 | /** No sex tag, null value or "U" value. */
30 | fun isUndefined(): Boolean {
31 | return value == null || value == "U"
32 | }
33 |
34 | internal fun setSex(person: Person, newSex: SexUtil) {
35 | if (sexFact == null) {
36 | sexFact = EventFact()
37 | sexFact?.tag = "SEX"
38 | person.addEventFact(sexFact)
39 | }
40 | sexFact?.value = newSex.value
41 | }
42 |
43 | override fun toString(): String {
44 | if (sexFact == null) return "null"
45 | return "SEX $value"
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/trees_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
24 |
25 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #960F3E
4 | #720426
5 | #BE4265
6 | #8A6270
7 | #E99725
8 | #FCC762
9 | #FFE6AA
10 | #FFC42F
11 | #FAFAFA
12 | #FFF
13 | #CCFFFFFF
14 | #000
15 | #777
16 | #AA000000
17 | #BBB
18 | #960F3E
19 | #DDD
20 | #44AAFF
21 | #FF66DD
22 | #999
23 | #CCCCCC
24 | #E6E6E6
25 | #FFFFFF
26 | #666666
27 | #FFCC66
28 | #FFEEAA
29 | #AA9988
30 | #DDCCBB
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/profile/BaseFragment.kt:
--------------------------------------------------------------------------------
1 | package app.familygem.profile
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import android.widget.LinearLayout
8 | import androidx.fragment.app.Fragment
9 | import app.familygem.Global
10 | import app.familygem.Memory
11 | import app.familygem.R
12 | import org.folg.gedcom.model.Person
13 |
14 | abstract class BaseFragment : Fragment() {
15 |
16 | lateinit var layout: LinearLayout
17 | lateinit var person: Person
18 |
19 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
20 | val pageView = inflater.inflate(R.layout.profile_page_fragment, container, false)
21 | layout = pageView.findViewById(R.id.profile_page)
22 | createContent()
23 | return pageView
24 | }
25 |
26 | /** Must be called at the beginning of [createContent] */
27 | fun prepareContent(): Boolean {
28 | if (Global.gc == null) return false
29 | Memory.getLeaderObject()?.let { person = it as Person } ?: return false
30 | layout.removeAllViews()
31 | return true
32 | }
33 |
34 | abstract fun createContent()
35 |
36 | /** Updates all activity content. */
37 | fun refresh() {
38 | // Theoretically activity could be null
39 | activity?.let { (it as ProfileActivity).refresh() }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/detail/ExtensionActivity.java:
--------------------------------------------------------------------------------
1 | package app.familygem.detail;
2 |
3 | import android.text.InputType;
4 |
5 | import org.folg.gedcom.model.GedcomTag;
6 |
7 | import app.familygem.DetailActivity;
8 | import app.familygem.Memory;
9 | import app.familygem.R;
10 | import app.familygem.U;
11 | import app.familygem.util.ChangeUtil;
12 |
13 | public class ExtensionActivity extends DetailActivity {
14 |
15 | GedcomTag extension;
16 |
17 | @Override
18 | protected void format() {
19 | setTitle(getString(R.string.extension));
20 | extension = (GedcomTag)cast(GedcomTag.class);
21 | placeSlug(extension.getTag());
22 | place(getString(R.string.id), "Id", false, 0);
23 | place(getString(R.string.value), "Value");
24 | place("Ref", "Ref", false, 0);
25 | place("ParentTagName", "ParentTagName", false, 0); // Not sure if it is used in real life
26 | for (GedcomTag child : extension.getChildren()) {
27 | String text = U.traverseExtension(child, 0);
28 | if (text.endsWith("\n"))
29 | text = text.substring(0, text.length() - 1);
30 | placePiece(child.getTag(), text, child, InputType.TYPE_TEXT_FLAG_MULTI_LINE);
31 | }
32 | }
33 |
34 | @Override
35 | public void delete() {
36 | U.deleteExtension(extension, Memory.getSecondToLastObject(), null);
37 | ChangeUtil.INSTANCE.updateChangeDate(Memory.getLeaderObject());
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/visitor/NoteContainers.java:
--------------------------------------------------------------------------------
1 | package app.familygem.visitor;
2 |
3 | import org.folg.gedcom.model.ExtensionContainer;
4 | import org.folg.gedcom.model.Gedcom;
5 | import org.folg.gedcom.model.Note;
6 | import org.folg.gedcom.model.NoteContainer;
7 | import org.folg.gedcom.model.NoteRef;
8 |
9 | import java.util.HashSet;
10 | import java.util.Set;
11 |
12 | /**
13 | * Visitor somewhat complementary to NoteReferences, having a double function:
14 | * - Edits refs pointing to the shared note
15 | * - Collects a list of containers that include the shared Note
16 | */
17 | public class NoteContainers extends TotalVisitor {
18 |
19 | public Set containers = new HashSet<>();
20 | private Note note; // The shared Note to search for
21 | private String newId; // The new ID to put in the Ref
22 |
23 | public NoteContainers(Gedcom gedcom, Note note, String newId) {
24 | this.note = note;
25 | this.newId = newId;
26 | gedcom.accept(this);
27 | }
28 |
29 | @Override
30 | boolean visit(ExtensionContainer object, boolean isLeader) {
31 | if (object instanceof NoteContainer) {
32 | for (NoteRef noteRef : ((NoteContainer)object).getNoteRefs()) {
33 | if (noteRef.getRef().equals(note.getId())) {
34 | noteRef.setRef(newId);
35 | containers.add((NoteContainer)object);
36 | }
37 | }
38 | }
39 | return true;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/visitor/MediaContainers.java:
--------------------------------------------------------------------------------
1 | package app.familygem.visitor;
2 |
3 | import org.folg.gedcom.model.ExtensionContainer;
4 | import org.folg.gedcom.model.Gedcom;
5 | import org.folg.gedcom.model.Media;
6 | import org.folg.gedcom.model.MediaContainer;
7 | import org.folg.gedcom.model.MediaRef;
8 |
9 | import java.util.HashSet;
10 | import java.util.Set;
11 |
12 | /**
13 | * Visitor somewhat complementary to MediaReferences, having a double function:
14 | * - Edit the refs pointing to the shared Media (if newId is not null)
15 | * - Collect a list of containers that include the shared Media
16 | */
17 | public class MediaContainers extends TotalVisitor {
18 |
19 | public Set containers = new HashSet<>();
20 | private final Media media;
21 | private final String newId;
22 |
23 | public MediaContainers(Gedcom gedcom, Media media, String newId) {
24 | this.media = media;
25 | this.newId = newId;
26 | gedcom.accept(this);
27 | }
28 |
29 | @Override
30 | boolean visit(ExtensionContainer object, boolean isLeader) {
31 | if (object instanceof MediaContainer) {
32 | for (MediaRef mediaRef : ((MediaContainer)object).getMediaRefs()) {
33 | if (mediaRef.getRef().equals(media.getId())) {
34 | if (newId != null) mediaRef.setRef(newId);
35 | containers.add((MediaContainer)object);
36 | }
37 | }
38 | }
39 | return true;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
19 |
20 |
26 |
27 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/file_info_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
17 |
18 |
23 |
24 |
31 |
32 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/media_folders_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
15 |
16 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Status.java:
--------------------------------------------------------------------------------
1 | package app.familygem.constant;
2 |
3 | import org.folg.gedcom.model.EventFact;
4 | import org.folg.gedcom.model.Family;
5 |
6 | /**
7 | * Family situation.
8 | */
9 | public enum Status {
10 |
11 | NONE, // Generic relationship
12 | MARRIED, DIVORCED, SEPARATED;
13 |
14 | /**
15 | * Finds the status of a family.
16 | */
17 | public static Status getStatus(Family family) {
18 | Status status = NONE;
19 | if (family != null) {
20 | for (EventFact event : family.getEventsFacts()) {
21 | String tag = event.getTag();
22 | switch (tag) {
23 | case "MARR":
24 | String type = event.getType();
25 | if (type == null || type.isEmpty() || type.equals("marriage")
26 | || type.equals("civil") || type.equals("religious") || type.equals("common law"))
27 | status = MARRIED;
28 | else
29 | status = NONE;
30 | break;
31 | case "MARB":
32 | case "MARC":
33 | case "MARL":
34 | case "MARS":
35 | status = MARRIED;
36 | break;
37 | case "DIV":
38 | status = status == MARRIED ? DIVORCED : SEPARATED;
39 | break;
40 | }
41 | }
42 | }
43 | return status;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/locales_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
41 |
44 |
45 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/tree_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
20 |
21 |
30 |
31 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/xml-v35/locales_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
41 |
44 |
45 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/constant/Gender.java:
--------------------------------------------------------------------------------
1 | package app.familygem.constant;
2 |
3 | import org.folg.gedcom.model.EventFact;
4 | import org.folg.gedcom.model.Person;
5 |
6 | public enum Gender {
7 |
8 | NONE, // No SEX tag
9 | EMPTY, // SEX tag with empty value
10 | MALE, // SEX M
11 | FEMALE, // SEX F
12 | UNKNOWN, // SEX U
13 | OTHER; // Some other value
14 |
15 | /**
16 | * Finds the gender of a person.
17 | */
18 | public static Gender getGender(Person person) {
19 | for (EventFact fact : person.getEventsFacts()) {
20 | if ("SEX".equals(fact.getTag())) {
21 | if (fact.getValue() == null)
22 | return EMPTY; // There is SEX tag but the value is empty
23 | else {
24 | switch (fact.getValue()) {
25 | case "M":
26 | return MALE;
27 | case "F":
28 | return FEMALE;
29 | case "U":
30 | return UNKNOWN;
31 | default:
32 | return OTHER;
33 | }
34 | }
35 | }
36 | }
37 | return NONE; // There is no SEX tag
38 | }
39 |
40 | public static boolean isMale(Person person) {
41 | return getGender(person) == MALE;
42 | }
43 |
44 | public static boolean isFemale(Person person) {
45 | return getGender(person) == FEMALE;
46 | }
47 |
48 | public static boolean isDefined(Person person) {
49 | Gender gender = getGender(person);
50 | return gender == MALE || gender == FEMALE || gender == OTHER;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/purchase_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
25 |
26 |
32 |
33 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/media_folder_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
30 |
31 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/detail/SubmitterActivity.java:
--------------------------------------------------------------------------------
1 | package app.familygem.detail;
2 |
3 | import android.text.InputType;
4 |
5 | import org.folg.gedcom.model.Submitter;
6 |
7 | import app.familygem.DetailActivity;
8 | import app.familygem.R;
9 | import app.familygem.main.SubmittersFragment;
10 | import app.familygem.util.ChangeUtil;
11 |
12 | public class SubmitterActivity extends DetailActivity {
13 |
14 | Submitter submitter;
15 |
16 | @Override
17 | protected void format() {
18 | setTitle(R.string.submitter);
19 | submitter = (Submitter)cast(Submitter.class);
20 | placeSlug("SUBM", submitter.getId());
21 | place(getString(R.string.value), "Value", false, 0); // A submitter shouldn't have any Value
22 | place(getString(R.string.name), "Name", true, InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_WORDS);
23 | place(getString(R.string.address), submitter.getAddress());
24 | place(getString(R.string.www), "Www", true, InputType.TYPE_CLASS_TEXT);
25 | place(getString(R.string.email), "Email", true, InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
26 | place(getString(R.string.telephone), "Phone", true, InputType.TYPE_CLASS_PHONE);
27 | place(getString(R.string.fax), "Fax", true, InputType.TYPE_CLASS_PHONE);
28 | place(getString(R.string.language), "Language");
29 | place(getString(R.string.rin), "Rin", false, 0);
30 | placeExtensions(submitter);
31 | ChangeUtil.INSTANCE.placeChangeDate(box, submitter.getChange());
32 | }
33 |
34 | @Override
35 | public void delete() {
36 | // Doesn't update the change date of any record.
37 | SubmittersFragment.deleteSubmitter(submitter);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/DatePickerFragment.kt:
--------------------------------------------------------------------------------
1 | package app.familygem
2 |
3 | import android.app.DatePickerDialog
4 | import android.app.Dialog
5 |
6 | import android.os.Bundle
7 | import android.widget.DatePicker
8 | import androidx.fragment.app.DialogFragment
9 | import app.familygem.main.TreeSettingsFragment
10 | import org.joda.time.LocalDate
11 | import java.util.Calendar
12 |
13 | class DatePickerFragment(val fragment: TreeSettingsFragment) : DialogFragment(), DatePickerDialog.OnDateSetListener {
14 |
15 | override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
16 | val year: Int
17 | val month: Int
18 | val day: Int
19 | if (fragment.date == null) {
20 | val now = LocalDate.now() // Current time
21 | year = now.year
22 | month = now.monthOfYear - 1
23 | day = now.dayOfMonth
24 | } else {
25 | year = fragment.date!!.year
26 | month = fragment.date!!.monthOfYear - 1
27 | day = fragment.date!!.dayOfMonth
28 | }
29 | val dialog = DatePickerDialog(requireActivity(), this, year, month, day)
30 | val calendar: Calendar = Calendar.getInstance()
31 | calendar.set(1, 0, 1);
32 | dialog.datePicker.minDate = calendar.timeInMillis;
33 | calendar.set(3000, 11, 31);
34 | dialog.datePicker.maxDate = calendar.timeInMillis;
35 | dialog.datePicker.init(year, month, day, null) // Fixes a bug of datePicker with years before 1900
36 | return dialog
37 | }
38 |
39 | override fun onDateSet(picker: DatePicker?, year: Int, month: Int, day: Int) {
40 | fragment.date = LocalDate(year, month + 1, day)
41 | fragment.writeDate()
42 | fragment.edited = true
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/media_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
18 |
19 |
28 |
29 |
36 |
37 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/detail/NoteActivity.java:
--------------------------------------------------------------------------------
1 | package app.familygem.detail;
2 |
3 | import android.app.Activity;
4 | import android.text.InputType;
5 |
6 | import org.folg.gedcom.model.Note;
7 |
8 | import app.familygem.DetailActivity;
9 | import app.familygem.Global;
10 | import app.familygem.Memory;
11 | import app.familygem.R;
12 | import app.familygem.U;
13 | import app.familygem.util.ChangeUtil;
14 | import app.familygem.visitor.NoteReferences;
15 |
16 | public class NoteActivity extends DetailActivity {
17 |
18 | Note note;
19 |
20 | @Override
21 | protected void format() {
22 | note = (Note)cast(Note.class);
23 | if (note.getId() == null) {
24 | setTitle(R.string.note);
25 | placeSlug("NOTE");
26 | } else {
27 | setTitle(R.string.shared_note);
28 | placeSlug("NOTE", note.getId());
29 | }
30 | place(getString(R.string.text), "Value", true, InputType.TYPE_TEXT_FLAG_MULTI_LINE);
31 | place(getString(R.string.rin), "Rin", false, 0);
32 | placeExtensions(note);
33 | U.placeSourceCitations(box, note);
34 | ChangeUtil.INSTANCE.placeChangeDate(box, note.getChange());
35 | if (note.getId() != null) {
36 | NoteReferences noteRefs = new NoteReferences(Global.gc, note.getId(), false);
37 | if (noteRefs.count > 0)
38 | placeCabinet(noteRefs.leaders.toArray(), R.string.shared_by);
39 | } else if (((Activity)box.getContext()).getIntent().getBooleanExtra("fromNotes", false)) {
40 | placeCabinet(Memory.getLeaderObject(), R.string.written_in);
41 | }
42 | }
43 |
44 | @Override
45 | public void delete() {
46 | ChangeUtil.INSTANCE.updateChangeDate(U.deleteNote(note));
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/SpeechBubble.java:
--------------------------------------------------------------------------------
1 | package app.familygem;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.os.Handler;
6 | import android.os.Looper;
7 | import android.view.View;
8 | import android.widget.LinearLayout;
9 | import android.widget.TextView;
10 |
11 | /**
12 | * Balloon with a hint that appears above the FAB.
13 | */
14 | public class SpeechBubble {
15 |
16 | private final View balloon;
17 |
18 | public SpeechBubble(Context context, int textId) {
19 | this(context, context.getString(textId));
20 | }
21 |
22 | public SpeechBubble(Context context, String testo) {
23 | Activity attivita = (Activity)context;
24 | balloon = attivita.getLayoutInflater().inflate(R.layout.fabuloso, null);
25 | balloon.setVisibility(View.INVISIBLE);
26 | ((LinearLayout)attivita.findViewById(R.id.fab_box)).addView(balloon, 0,
27 | new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
28 | ((TextView)balloon.findViewById(R.id.fabuloso_text)).setText(testo);
29 | balloon.setOnTouchListener((vista, evento) -> {
30 | hide();
31 | return true;
32 | });
33 | attivita.findViewById(R.id.fab).setOnTouchListener((vista, evento) -> {
34 | hide();
35 | //vista.performClick();
36 | return false; // Per eseguire il click dopo
37 | });
38 | }
39 |
40 | public void show() {
41 | new Handler(Looper.myLooper()).postDelayed(() -> { // compare dopo un secondo
42 | balloon.setVisibility(View.VISIBLE);
43 | }, 1000);
44 | }
45 |
46 | public void hide() {
47 | balloon.setVisibility(View.INVISIBLE);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/profile_facts_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
23 |
24 |
30 |
31 |
38 |
39 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/visitor/MediaContainersGuarded.java:
--------------------------------------------------------------------------------
1 | package app.familygem.visitor;
2 |
3 | import org.folg.gedcom.model.ExtensionContainer;
4 | import org.folg.gedcom.model.Gedcom;
5 | import org.folg.gedcom.model.MediaContainer;
6 | import org.folg.gedcom.model.MediaRef;
7 |
8 | /**
9 | * Visitor similar to MediaContainers, having a double function:
10 | * - Edits the references pointing to a shared media using an uniqueness guardian
11 | * - Removes the guardians
12 | */
13 | public class MediaContainersGuarded extends TotalVisitor {
14 |
15 | private final String oldId;
16 | private final String newId;
17 | private final boolean clean;
18 |
19 | public MediaContainersGuarded(Gedcom gedcom, String oldId, String newId, boolean clean) {
20 | this.oldId = oldId;
21 | this.newId = newId;
22 | this.clean = clean;
23 | gedcom.accept(this);
24 | }
25 |
26 | @Override
27 | boolean visit(ExtensionContainer object, boolean isLeader) {
28 | if (object instanceof MediaContainer) {
29 | final String GUARDIAN = "modifiedMediaRef";
30 | for (MediaRef mediaRef : ((MediaContainer)object).getMediaRefs()) {
31 | // Removes guardian
32 | if (clean && mediaRef.getExtension(GUARDIAN) != null) {
33 | mediaRef.getExtensions().remove(GUARDIAN);
34 | if (mediaRef.getExtensions().isEmpty())
35 | mediaRef.setExtensions(null);
36 | } // Modifies ID and adds guardian
37 | else if (mediaRef.getExtension(GUARDIAN) == null && mediaRef.getRef().equals(oldId)) {
38 | mediaRef.setRef(newId);
39 | mediaRef.putExtension(GUARDIAN, true);
40 | }
41 | }
42 | }
43 | return true;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/confirmation_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
15 |
16 |
23 |
24 |
30 |
31 |
37 |
38 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/detail/AddressActivity.java:
--------------------------------------------------------------------------------
1 | package app.familygem.detail;
2 |
3 | import android.text.InputType;
4 |
5 | import org.folg.gedcom.model.Address;
6 |
7 | import app.familygem.DetailActivity;
8 | import app.familygem.Memory;
9 | import app.familygem.R;
10 | import app.familygem.util.ChangeUtil;
11 |
12 | public class AddressActivity extends DetailActivity {
13 |
14 | Address address;
15 |
16 | @Override
17 | protected void format() {
18 | setTitle(R.string.address);
19 | placeSlug("ADDR");
20 | address = (Address)cast(Address.class);
21 | int capWords = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_WORDS;
22 | int capChars = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS;
23 | // Deprecated by GEDCOM standard in favor of the fragmented address
24 | place(getString(R.string.value), "Value", false, capWords | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
25 | place(getString(R.string.name), "Name", false, capWords); // '_NAME' tag not GEDCOM standard
26 | place(getString(R.string.line_1), "AddressLine1", true, capWords);
27 | place(getString(R.string.line_2), "AddressLine2", true, capWords);
28 | place(getString(R.string.line_3), "AddressLine3", true, capWords);
29 | place(getString(R.string.postal_code), "PostalCode", true, capChars);
30 | place(getString(R.string.city), "City", true, capWords);
31 | place(getString(R.string.state), "State", true, capChars);
32 | place(getString(R.string.country), "Country", true, capWords);
33 | placeExtensions(address);
34 | }
35 |
36 | @Override
37 | public void delete() {
38 | deleteAddress(Memory.getSecondToLastObject());
39 | ChangeUtil.INSTANCE.updateChangeDate(Memory.getLeaderObject());
40 | Memory.setInstanceAndAllSubsequentToNull(address);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/diagram_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
22 |
23 |
24 |
31 |
32 |
39 |
40 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/visitor/NoteContainersGuarded.java:
--------------------------------------------------------------------------------
1 | package app.familygem.visitor;
2 |
3 | import org.folg.gedcom.model.ExtensionContainer;
4 | import org.folg.gedcom.model.Gedcom;
5 | import org.folg.gedcom.model.NoteContainer;
6 | import org.folg.gedcom.model.NoteRef;
7 |
8 | /**
9 | * Visitor similar to NoteContainers, having a double function:
10 | * - Edits the references pointing to a shared note, using an uniqueness guardian
11 | * - Removes the guardians
12 | */
13 | public class NoteContainersGuarded extends TotalVisitor {
14 |
15 | private final String oldId; // The old ID of the shared note to search for
16 | private final String newId; // The new ID to put in the Ref
17 | private final boolean clean;
18 |
19 | public NoteContainersGuarded(Gedcom gedcom, String oldId, String newId, boolean clean) {
20 | this.oldId = oldId;
21 | this.newId = newId;
22 | this.clean = clean;
23 | gedcom.accept(this);
24 | }
25 |
26 | @Override
27 | boolean visit(ExtensionContainer object, boolean isLeader) {
28 | if (object instanceof NoteContainer) {
29 | final String GUARDIAN = "modifiedNoteRef";
30 | for (NoteRef noteRef : ((NoteContainer)object).getNoteRefs()) {
31 | // Removes guardian
32 | if (clean && noteRef.getExtension(GUARDIAN) != null) {
33 | noteRef.getExtensions().remove(GUARDIAN);
34 | if (noteRef.getExtensions().isEmpty())
35 | noteRef.setExtensions(null);
36 | } // Modifies ID and adds guardian
37 | else if (noteRef.getExtension(GUARDIAN) == null && noteRef.getRef().equals(oldId)) {
38 | noteRef.setRef(newId);
39 | noteRef.putExtension(GUARDIAN, true);
40 | }
41 | }
42 | }
43 | return true;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/compare_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
15 |
16 |
23 |
24 |
27 |
28 |
34 |
35 |
41 |
42 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/main_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
14 |
15 |
19 |
20 |
24 |
25 |
26 |
31 |
32 |
33 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/java/app/familygem/visitor/NoteReferences.java:
--------------------------------------------------------------------------------
1 | package app.familygem.visitor;
2 |
3 | import org.folg.gedcom.model.ExtensionContainer;
4 | import org.folg.gedcom.model.Gedcom;
5 | import org.folg.gedcom.model.NoteContainer;
6 | import org.folg.gedcom.model.NoteRef;
7 |
8 | import java.util.Iterator;
9 | import java.util.LinkedHashSet;
10 | import java.util.Set;
11 |
12 | /**
13 | * Visitor for shared Note with a triple function:
14 | * - Counts in all the records of the Gedcom the references to the shared Note
15 | * - Optionally deletes these references to the Note
16 | * - In the meantime, collects all the leader objects
17 | */
18 | public class NoteReferences extends TotalVisitor {
19 |
20 | private String id; // Id of the shared Note
21 | private boolean deleteRefs; // Flag to delete the Refs to the Note rather than counting them
22 | private Object leader;
23 | public int count = 0; // Number of references to the shared note
24 | public Set