Compare commits

...

2 Commits

Author SHA1 Message Date
soraefir
25abde0ba3
Minor cleaning 2024-04-13 01:21:18 +02:00
soraefir
eda0bc19a0
Moved ATA 2024-04-13 01:13:52 +02:00
7 changed files with 10 additions and 10 deletions

View File

@ -5,17 +5,14 @@ import android.view.Menu
import android.view.MenuItem
import androidx.activity.addCallback
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import com.google.android.material.tabs.TabLayoutMediator
import net.helcel.beans.R
import net.helcel.beans.activity.adapter.ViewPagerAdapter
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.countries.World
import net.helcel.beans.databinding.ActivityEditBinding
import net.helcel.beans.helper.Data
import net.helcel.beans.helper.DialogCloser
import net.helcel.beans.helper.Settings
import net.helcel.beans.helper.Theme.createActionBar
@ -62,6 +59,7 @@ class EditActivity : AppCompatActivity() {
}, {}, false).show(supportFragmentManager, "AddColorDialogFragment")
}
}
else -> finish()
}
return super.onOptionsItemSelected(item)

View File

@ -12,7 +12,6 @@ import net.helcel.beans.countries.GeoLocImporter
import net.helcel.beans.databinding.ActivityMainBinding
import net.helcel.beans.helper.Data
import net.helcel.beans.helper.Settings
import net.helcel.beans.helper.Theme.colorWrapper
import net.helcel.beans.svg.CSSWrapper
import net.helcel.beans.svg.SVGWrapper

View File

@ -287,8 +287,8 @@ enum class Group(override val fullName: String, override val children: Set<GeoLo
),
XXX(
"Antarctica", setOf(
ATA, // Antarctica: not in any other region
"Other", setOf(
)
),

View File

@ -6,14 +6,15 @@ enum class World(override val fullName: String, override val children: Set<GeoLo
WWW(
"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 ->
acc + i.area
}
override val type = GeoLoc.LocType.WORLD
override val code = this.name
}

View File

@ -1,13 +1,15 @@
package net.helcel.beans.svg
import android.content.Context
import android.content.SharedPreferences
import androidx.preference.PreferenceManager
import com.caverock.androidsvg.SVG
import net.helcel.beans.R
class SVGWrapper(ctx: Context) {
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(ctx)
private val sharedPreferences: SharedPreferences =
PreferenceManager.getDefaultSharedPreferences(ctx)
private val svgFile = when (sharedPreferences.getString(
ctx.getString(R.string.key_projection),
ctx.getString(R.string.mercator)