Minor cleaning

This commit is contained in:
soraefir 2024-04-13 01:21:18 +02:00
parent eda0bc19a0
commit 25abde0ba3
Signed by: sora
GPG Key ID: A362EA0491E2EEA0
5 changed files with 4 additions and 5 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

@ -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)