Compare commits
46 Commits
8e2304f5fc
...
1.0a
Author | SHA1 | Date | |
---|---|---|---|
af839915cc
|
|||
9fb11df99e | |||
9e18619271 | |||
755c0cd5c2 | |||
64c5f54eb8 | |||
18a037421c | |||
9660c19db7 | |||
bad189507d | |||
58ad43fffe | |||
54f4bb9138 | |||
4f578b027d | |||
cd4649b329 | |||
2a29237e26 | |||
17dd26b3b0 | |||
942f713a2f | |||
df4e01352a | |||
e7ab816c46 | |||
d171437e6f | |||
f33711f075 | |||
e854b50515 | |||
38d11574b1 | |||
96bb3e9d37 | |||
fb132f81a6 | |||
8bfc9c21eb | |||
bd7f61e1f7 | |||
108c805409 | |||
3875413fa4 | |||
9630608934 | |||
fcbef4b992 | |||
38397ac27b | |||
785c0491b9 | |||
24e547a294 | |||
f636b0c884 | |||
86b0ad59f8 | |||
436e793200 | |||
192179e3af | |||
6aedb64207 | |||
81ef0185b9 | |||
1636934e42 | |||
36bd6c9a44 | |||
e58df0291c | |||
7e87ed360c | |||
cb6ae76a67 | |||
4d519fc9a2 | |||
25abde0ba3
|
|||
eda0bc19a0
|
@ -68,7 +68,7 @@ Thanks to all contributors, the developers of our dependencies, and our users.
|
|||||||
## 📝 License
|
## 📝 License
|
||||||
|
|
||||||
```
|
```
|
||||||
Copyright (C) 2024 Helcel MYDOLI
|
Copyright (C) 2024 Helcel & MYDOLI
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'org.jetbrains.kotlin.android'
|
id 'org.jetbrains.kotlin.android'
|
||||||
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.23'
|
id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.0'
|
||||||
id 'com.mikepenz.aboutlibraries.plugin' version '11.1.3'
|
id 'com.mikepenz.aboutlibraries.plugin' version '11.2.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -77,15 +77,16 @@ android {
|
|||||||
}
|
}
|
||||||
aboutLibraries {
|
aboutLibraries {
|
||||||
exclusionPatterns = [~"androidx.*", ~"com.google.android.*", ~"org.jetbrains.*"]
|
exclusionPatterns = [~"androidx.*", ~"com.google.android.*", ~"org.jetbrains.*"]
|
||||||
|
configPath = "config"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.4'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.4'
|
||||||
implementation 'androidx.preference:preference-ktx:1.2.1'
|
implementation 'androidx.preference:preference-ktx:1.2.1'
|
||||||
implementation 'com.google.android.material:material:1.11.0'
|
implementation 'com.google.android.material:material:1.12.0'
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3'
|
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.0'
|
||||||
|
|
||||||
implementation 'com.caverock:androidsvg-aar:1.4'
|
implementation 'com.caverock:androidsvg-aar:1.4'
|
||||||
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
||||||
implementation 'com.mikepenz:aboutlibraries:11.1.3'
|
implementation 'com.mikepenz:aboutlibraries:11.2.1'
|
||||||
}
|
}
|
@ -1,6 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0a">
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
@ -5,17 +5,14 @@ import android.view.Menu
|
|||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import androidx.activity.addCallback
|
import androidx.activity.addCallback
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import com.google.android.material.tabs.TabLayoutMediator
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
import net.helcel.beans.R
|
import net.helcel.beans.R
|
||||||
import net.helcel.beans.activity.adapter.ViewPagerAdapter
|
import net.helcel.beans.activity.adapter.ViewPagerAdapter
|
||||||
import net.helcel.beans.activity.fragment.EditGroupAddFragment
|
import net.helcel.beans.activity.fragment.EditGroupAddFragment
|
||||||
import net.helcel.beans.activity.fragment.EditPlaceColorFragment
|
|
||||||
import net.helcel.beans.activity.fragment.EditPlaceFragment
|
import net.helcel.beans.activity.fragment.EditPlaceFragment
|
||||||
import net.helcel.beans.countries.World
|
import net.helcel.beans.countries.World
|
||||||
import net.helcel.beans.databinding.ActivityEditBinding
|
import net.helcel.beans.databinding.ActivityEditBinding
|
||||||
import net.helcel.beans.helper.Data
|
import net.helcel.beans.helper.Data
|
||||||
import net.helcel.beans.helper.DialogCloser
|
|
||||||
import net.helcel.beans.helper.Settings
|
import net.helcel.beans.helper.Settings
|
||||||
import net.helcel.beans.helper.Theme.createActionBar
|
import net.helcel.beans.helper.Theme.createActionBar
|
||||||
|
|
||||||
@ -62,6 +59,7 @@ class EditActivity : AppCompatActivity() {
|
|||||||
}, {}, false).show(supportFragmentManager, "AddColorDialogFragment")
|
}, {}, false).show(supportFragmentManager, "AddColorDialogFragment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> finish()
|
else -> finish()
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item)
|
return super.onOptionsItemSelected(item)
|
||||||
|
@ -12,7 +12,6 @@ import net.helcel.beans.countries.GeoLocImporter
|
|||||||
import net.helcel.beans.databinding.ActivityMainBinding
|
import net.helcel.beans.databinding.ActivityMainBinding
|
||||||
import net.helcel.beans.helper.Data
|
import net.helcel.beans.helper.Data
|
||||||
import net.helcel.beans.helper.Settings
|
import net.helcel.beans.helper.Settings
|
||||||
import net.helcel.beans.helper.Theme.colorWrapper
|
|
||||||
import net.helcel.beans.svg.CSSWrapper
|
import net.helcel.beans.svg.CSSWrapper
|
||||||
import net.helcel.beans.svg.SVGWrapper
|
import net.helcel.beans.svg.SVGWrapper
|
||||||
|
|
||||||
|
@ -287,8 +287,8 @@ enum class Group(override val fullName: String, override val children: Set<GeoLo
|
|||||||
),
|
),
|
||||||
|
|
||||||
XXX(
|
XXX(
|
||||||
"Antarctica", setOf(
|
"Other", setOf(
|
||||||
ATA, // Antarctica: not in any other region
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -6,14 +6,15 @@ enum class World(override val fullName: String, override val children: Set<GeoLo
|
|||||||
|
|
||||||
WWW(
|
WWW(
|
||||||
"World", setOf(
|
"World", setOf(
|
||||||
EEE, ABB, FFF, NNN, SRR, UUU, XXX
|
EEE, ABB, FFF, NNN, SRR, UUU, Country.ATA,
|
||||||
)
|
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
override val area = children.fold(0) { acc, i ->
|
override val area = children.fold(0) { acc, i ->
|
||||||
acc + i.area
|
acc + i.area
|
||||||
}
|
}
|
||||||
|
|
||||||
override val type = GeoLoc.LocType.WORLD
|
override val type = GeoLoc.LocType.WORLD
|
||||||
override val code = this.name
|
override val code = this.name
|
||||||
}
|
}
|
@ -1,13 +1,15 @@
|
|||||||
package net.helcel.beans.svg
|
package net.helcel.beans.svg
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.content.SharedPreferences
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import com.caverock.androidsvg.SVG
|
import com.caverock.androidsvg.SVG
|
||||||
import net.helcel.beans.R
|
import net.helcel.beans.R
|
||||||
|
|
||||||
class SVGWrapper(ctx: Context) {
|
class SVGWrapper(ctx: Context) {
|
||||||
|
|
||||||
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(ctx)
|
private val sharedPreferences: SharedPreferences =
|
||||||
|
PreferenceManager.getDefaultSharedPreferences(ctx)
|
||||||
private val svgFile = when (sharedPreferences.getString(
|
private val svgFile = when (sharedPreferences.getString(
|
||||||
ctx.getString(R.string.key_projection),
|
ctx.getString(R.string.key_projection),
|
||||||
ctx.getString(R.string.mercator)
|
ctx.getString(R.string.mercator)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Beans</string>
|
<string name="app_name">Beans</string>
|
||||||
<string name="app_version">1.0</string>
|
<string name="app_version">1.0a</string>
|
||||||
<string name="action_settings">Settings</string>
|
<string name="action_settings">Settings</string>
|
||||||
<string name="action_stat">Stats</string>
|
<string name="action_stat">Stats</string>
|
||||||
<string name="action_edit">Edit</string>
|
<string name="action_edit">Edit</string>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application' version '8.3.2' apply false
|
id 'com.android.application' version '8.4.2' apply false
|
||||||
id 'com.android.library' version '8.3.2' apply false
|
id 'com.android.library' version '8.4.2' apply false
|
||||||
id 'org.jetbrains.kotlin.android' version '1.9.23' apply false
|
id 'org.jetbrains.kotlin.android' version '2.0.0' apply false
|
||||||
}
|
}
|
21
config/libraries/lib_gadm.json
Normal file
21
config/libraries/lib_gadm.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"uniqueId": "org.gadm:data",
|
||||||
|
"developers": [
|
||||||
|
{
|
||||||
|
"organisationUrl": "https://gadm.org/index.html",
|
||||||
|
"name": "GADM"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"artifactVersion": "4.1",
|
||||||
|
"description": "GADM provides maps and spatial data for all countries and their sub-divisions.",
|
||||||
|
"scm": {
|
||||||
|
"connection": "scm:git@github.com:mikepenz/MaterialDrawer.git",
|
||||||
|
"url": "https://github.com/mikepenz/MaterialDrawer",
|
||||||
|
"developerConnection": "scm:git@github.com:mikepenz/MaterialDrawer.git"
|
||||||
|
},
|
||||||
|
"name": "GADM maps and data",
|
||||||
|
"website": "https://gadm.org/index.html",
|
||||||
|
"licenses": [
|
||||||
|
"0151ac7b561a385c536ad4c94532e60b"
|
||||||
|
]
|
||||||
|
}
|
6
config/licenses/lic_gadm.json
Normal file
6
config/licenses/lic_gadm.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"content": "<b>The data are freely available for academic use and other non-commercial use. Redistribution or commercial use is not allowed without prior permission.</b>\n\nUsing the data to create maps for publishing of academic research articles is allowed. Thus you can use the maps you made with GADM data for figures in articles published by PLoS, Springer Nature, Elsevier, MDPI, etc. You are allowed (but not required) to publish these articles (and the maps they contain) under an open license such as CC-BY as is the case with PLoS journals and may be the case with other open access articles. <b>Data for the following countries is covered by a a different license</b> <b>Austria</b>: Creative Commons Attribution-ShareAlike 2.0 (source: Government of Ausria)",
|
||||||
|
"hash": "0151ac7b561a385c536ad4c94532e60b",
|
||||||
|
"url": "https://gadm.org/license.html",
|
||||||
|
"name": "GADM license"
|
||||||
|
}
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,8 +1,8 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionSha256Sum=544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d
|
|
||||||
|
2
gradlew
vendored
2
gradlew
vendored
@ -55,7 +55,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@turf/area": "^6.5.0",
|
"@turf/area": "^7.0.0",
|
||||||
"@turf/turf": "^6.5.0",
|
"@turf/turf": "^7.0.0",
|
||||||
"jsdom": "^24.0.0",
|
"jsdom": "^24.0.0",
|
||||||
"mapshaper": "^0.6.79"
|
"mapshaper": "^0.6.79"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user