Minor cleaning
This commit is contained in:
parent
eda0bc19a0
commit
25abde0ba3
@ -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
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user