From 50b9fa482b4c9bc870856575945ae02b7466d800 Mon Sep 17 00:00:00 2001 From: Lucas Lima Date: Sat, 27 Jun 2020 23:34:39 -0300 Subject: [PATCH] Small improvements --- .../antimine/about/views/thirds/ThirdPartiesFragment.kt | 2 +- .../antimine/about/views/translators/TranslatorsFragment.kt | 2 +- .../dev/lucasnlm/antimine/control/ControlDialogFragment.kt | 6 +++--- .../lucasnlm/antimine/custom/CustomLevelDialogFragment.kt | 2 +- .../lucasnlm/antimine/level/view/EndGameDialogFragment.kt | 2 +- .../dev/lucasnlm/antimine/common/level/view/AreaAdapter.kt | 2 +- .../antimine/core/analytics/DebugAnalyticsManager.kt | 2 +- common/src/main/res/values/strings.xml | 1 + 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/dev/lucasnlm/antimine/about/views/thirds/ThirdPartiesFragment.kt b/app/src/main/java/dev/lucasnlm/antimine/about/views/thirds/ThirdPartiesFragment.kt index 7b461cea..3e0c6f50 100644 --- a/app/src/main/java/dev/lucasnlm/antimine/about/views/thirds/ThirdPartiesFragment.kt +++ b/app/src/main/java/dev/lucasnlm/antimine/about/views/thirds/ThirdPartiesFragment.kt @@ -50,6 +50,6 @@ class ThirdPartiesFragment : Fragment() { } companion object { - const val TAG = "ThirdPartiesFragment" + val TAG = ThirdPartiesFragment::class.simpleName!! } } diff --git a/app/src/main/java/dev/lucasnlm/antimine/about/views/translators/TranslatorsFragment.kt b/app/src/main/java/dev/lucasnlm/antimine/about/views/translators/TranslatorsFragment.kt index 24f3c677..ccc7d48a 100644 --- a/app/src/main/java/dev/lucasnlm/antimine/about/views/translators/TranslatorsFragment.kt +++ b/app/src/main/java/dev/lucasnlm/antimine/about/views/translators/TranslatorsFragment.kt @@ -42,6 +42,6 @@ class TranslatorsFragment : Fragment() { } companion object { - const val TAG = "TranslatorsFragment" + val TAG = TranslatorsFragment::class.simpleName!! } } diff --git a/app/src/main/java/dev/lucasnlm/antimine/control/ControlDialogFragment.kt b/app/src/main/java/dev/lucasnlm/antimine/control/ControlDialogFragment.kt index 4dda94ae..145ca739 100644 --- a/app/src/main/java/dev/lucasnlm/antimine/control/ControlDialogFragment.kt +++ b/app/src/main/java/dev/lucasnlm/antimine/control/ControlDialogFragment.kt @@ -36,7 +36,7 @@ class ControlDialogFragment : AppCompatDialogFragment() { return AlertDialog.Builder(requireContext(), R.style.MyDialog).apply { setTitle(R.string.control) setSingleChoiceItems(adapter, currentControl, null) - setPositiveButton(android.R.string.ok, null) // TODO OK + setPositiveButton(R.string.ok, null) // TODO OK }.create() } @@ -47,7 +47,7 @@ class ControlDialogFragment : AppCompatDialogFragment() { super.onDismiss(dialog) } - class ControlListAdapter( + private class ControlListAdapter( private val controlViewModel: ControlViewModel ) : BaseAdapter() { private var selected = controlViewModel.controlTypeSelected.value @@ -86,6 +86,6 @@ class ControlDialogFragment : AppCompatDialogFragment() { } companion object { - const val TAG = "ControlDialogFragment" + val TAG = ControlDialogFragment::class.simpleName!! } } diff --git a/app/src/main/java/dev/lucasnlm/antimine/custom/CustomLevelDialogFragment.kt b/app/src/main/java/dev/lucasnlm/antimine/custom/CustomLevelDialogFragment.kt index 6bfb52f2..b75c3117 100644 --- a/app/src/main/java/dev/lucasnlm/antimine/custom/CustomLevelDialogFragment.kt +++ b/app/src/main/java/dev/lucasnlm/antimine/custom/CustomLevelDialogFragment.kt @@ -97,6 +97,6 @@ class CustomLevelDialogFragment : AppCompatDialogFragment() { const val MIN_HEIGHT = 5 const val MIN_MINES = 3 - const val TAG = "CustomLevelDialogFragment" + val TAG = CustomLevelDialogFragment::class.simpleName!! } } diff --git a/app/src/main/java/dev/lucasnlm/antimine/level/view/EndGameDialogFragment.kt b/app/src/main/java/dev/lucasnlm/antimine/level/view/EndGameDialogFragment.kt index 4c0be941..3006ea70 100644 --- a/app/src/main/java/dev/lucasnlm/antimine/level/view/EndGameDialogFragment.kt +++ b/app/src/main/java/dev/lucasnlm/antimine/level/view/EndGameDialogFragment.kt @@ -147,6 +147,6 @@ class EndGameDialogFragment : AppCompatDialogFragment() { private const val DIALOG_TOTAL_MINES = "dialog_total_mines" private const val DIALOG_SAVE_ID = "dialog_save_id" - const val TAG = "EndGameDialogFragment" + val TAG = EndGameDialogFragment::class.simpleName!! } } diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/level/view/AreaAdapter.kt b/common/src/main/java/dev/lucasnlm/antimine/common/level/view/AreaAdapter.kt index 48edb0c3..fafcf794 100644 --- a/common/src/main/java/dev/lucasnlm/antimine/common/level/view/AreaAdapter.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/common/level/view/AreaAdapter.kt @@ -142,7 +142,7 @@ class AreaAdapter( } companion object { - const val TAG = "AreaAdapter" + val TAG = AreaAdapter::class.simpleName!! fun createAreaPaintSettings(context: Context, useLargeArea: Boolean): AreaPaintSettings { val resources = context.resources diff --git a/common/src/main/java/dev/lucasnlm/antimine/core/analytics/DebugAnalyticsManager.kt b/common/src/main/java/dev/lucasnlm/antimine/core/analytics/DebugAnalyticsManager.kt index 7579c998..3e4407eb 100644 --- a/common/src/main/java/dev/lucasnlm/antimine/core/analytics/DebugAnalyticsManager.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/core/analytics/DebugAnalyticsManager.kt @@ -14,6 +14,6 @@ class DebugAnalyticsManager : AnalyticsManager { } companion object { - const val TAG = "DebugAnalyticsManager" + val TAG = DebugAnalyticsManager::class.simpleName!! } } diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index a51eec96..ca263dc0 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -99,6 +99,7 @@ Total Time Average Time Performance + OK Use Question Flags Control