From 25abde0ba3baafb97b1d50498b4a575c84ff94ec Mon Sep 17 00:00:00 2001 From: soraefir Date: Sat, 13 Apr 2024 01:21:18 +0200 Subject: [PATCH] Minor cleaning --- app/src/main/java/net/helcel/beans/activity/EditActivity.kt | 4 +--- app/src/main/java/net/helcel/beans/activity/MainActivity.kt | 1 - app/src/main/java/net/helcel/beans/svg/SVGWrapper.kt | 4 +++- .../res/{mipmap-anydpi-v26 => mipmap-anydpi}/ic_launcher.xml | 0 .../ic_launcher_round.xml | 0 5 files changed, 4 insertions(+), 5 deletions(-) rename app/src/main/res/{mipmap-anydpi-v26 => mipmap-anydpi}/ic_launcher.xml (100%) rename app/src/main/res/{mipmap-anydpi-v26 => mipmap-anydpi}/ic_launcher_round.xml (100%) diff --git a/app/src/main/java/net/helcel/beans/activity/EditActivity.kt b/app/src/main/java/net/helcel/beans/activity/EditActivity.kt index d4f960b..b51c8f3 100644 --- a/app/src/main/java/net/helcel/beans/activity/EditActivity.kt +++ b/app/src/main/java/net/helcel/beans/activity/EditActivity.kt @@ -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) diff --git a/app/src/main/java/net/helcel/beans/activity/MainActivity.kt b/app/src/main/java/net/helcel/beans/activity/MainActivity.kt index 69225ea..5608420 100644 --- a/app/src/main/java/net/helcel/beans/activity/MainActivity.kt +++ b/app/src/main/java/net/helcel/beans/activity/MainActivity.kt @@ -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 diff --git a/app/src/main/java/net/helcel/beans/svg/SVGWrapper.kt b/app/src/main/java/net/helcel/beans/svg/SVGWrapper.kt index ff11a73..5162786 100644 --- a/app/src/main/java/net/helcel/beans/svg/SVGWrapper.kt +++ b/app/src/main/java/net/helcel/beans/svg/SVGWrapper.kt @@ -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) diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to app/src/main/res/mipmap-anydpi/ic_launcher.xml diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to app/src/main/res/mipmap-anydpi/ic_launcher_round.xml