fix activities translation

This commit is contained in:
Milos Kozak 2023-05-17 18:36:01 +02:00
parent 111093f7cd
commit 7faa34aa50
39 changed files with 78 additions and 97 deletions

View file

@ -11,9 +11,9 @@ import android.widget.TextView
import com.google.android.material.datepicker.MaterialDatePicker
import com.jjoe64.graphview.GraphView
import dagger.android.HasAndroidInjector
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.databinding.ActivityHistorybrowseBinding
import info.nightscout.core.events.EventIobCalculationProgress
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.core.workflow.CalculationWorkflow
import info.nightscout.interfaces.Config
@ -42,7 +42,7 @@ import java.util.GregorianCalendar
import javax.inject.Inject
import kotlin.math.min
class HistoryBrowseActivity : DaggerAppCompatActivity() {
class HistoryBrowseActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var historyBrowserData: HistoryBrowserData
@Inject lateinit var injector: HasAndroidInjector

View file

@ -1,6 +1,5 @@
package info.nightscout.androidaps.activities
import android.content.Context
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
@ -10,7 +9,6 @@ import androidx.preference.PreferenceScreen
import info.nightscout.androidaps.R
import info.nightscout.androidaps.databinding.ActivityPreferencesBinding
import info.nightscout.configuration.activities.DaggerAppCompatActivityWithResult
import info.nightscout.core.ui.locale.LocaleHelper
class PreferencesActivity : DaggerAppCompatActivityWithResult(), PreferenceFragmentCompat.OnPreferenceStartScreenCallback {
@ -66,10 +64,6 @@ class PreferencesActivity : DaggerAppCompatActivityWithResult(), PreferenceFragm
return true
}
override fun attachBaseContext(newBase: Context) {
super.attachBaseContext(LocaleHelper.wrap(newBase))
}
override fun onOptionsItemSelected(item: MenuItem): Boolean =
when (item.itemId) {
android.R.id.home -> {

View file

@ -4,7 +4,7 @@ import android.content.Context
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.locale.LocaleHelper
open class DialogAppCompatActivity : DaggerAppCompatActivity() {
open class TranslatedDaggerAppCompatActivity : DaggerAppCompatActivity() {
override fun attachBaseContext(newBase: Context) {
super.attachBaseContext(LocaleHelper.wrap(newBase))
}

View file

@ -1,12 +1,10 @@
package info.nightscout.configuration.activities
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import info.nightscout.configuration.R
import info.nightscout.core.ui.locale.LocaleHelper
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.interfaces.plugin.PluginBase
import info.nightscout.interfaces.protection.ProtectionCheck
@ -60,8 +58,4 @@ class SingleFragmentActivity : DaggerAppCompatActivityWithResult() {
if (plugin?.preferencesId != -1) menuInflater.inflate(R.menu.menu_single_fragment, menu)
return super.onCreateOptionsMenu(menu)
}
override fun attachBaseContext(newBase: Context) {
super.attachBaseContext(LocaleHelper.wrap(newBase))
}
}

View file

@ -5,14 +5,14 @@ import android.view.View
import android.widget.CheckBox
import android.widget.LinearLayout
import android.widget.TextView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.configuration.R
import info.nightscout.configuration.databinding.ActivityLogsettingBinding
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.rx.interfaces.L
import info.nightscout.rx.interfaces.LogElement
import javax.inject.Inject
class LogSettingActivity : DaggerAppCompatActivity() {
class LogSettingActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var l: L

View file

@ -1,6 +1,5 @@
package info.nightscout.configuration.maintenance.activities
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
@ -10,12 +9,11 @@ import android.view.ViewGroup
import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.configuration.R
import info.nightscout.configuration.databinding.MaintenanceImportListActivityBinding
import info.nightscout.configuration.databinding.MaintenanceImportListItemBinding
import info.nightscout.configuration.maintenance.PrefsFileContract
import info.nightscout.core.ui.locale.LocaleHelper
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.interfaces.maintenance.PrefFileListProvider
import info.nightscout.interfaces.maintenance.PrefsFile
import info.nightscout.interfaces.maintenance.PrefsMetadataKey
@ -23,7 +21,7 @@ import info.nightscout.interfaces.maintenance.PrefsStatus
import info.nightscout.shared.interfaces.ResourceHelper
import javax.inject.Inject
class PrefImportListActivity : DaggerAppCompatActivity() {
class PrefImportListActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var rh: ResourceHelper
@Inject lateinit var prefFileListProvider: PrefFileListProvider
@ -116,8 +114,4 @@ class PrefImportListActivity : DaggerAppCompatActivity() {
}
return super.onOptionsItemSelected(item)
}
override fun attachBaseContext(newBase: Context) {
super.attachBaseContext(LocaleHelper.wrap(newBase))
}
}

View file

@ -12,7 +12,7 @@ import android.view.View
import android.view.WindowManager
import com.google.common.primitives.Ints.min
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.core.utils.fabric.FabricPrivacy
@ -28,7 +28,7 @@ import info.nightscout.shared.interfaces.ResourceHelper
import net.glxn.qrgen.android.QRCode
import javax.inject.Inject
class SmsCommunicatorOtpActivity : DaggerAppCompatActivity() {
class SmsCommunicatorOtpActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var fabricPrivacy: FabricPrivacy
@Inject lateinit var smsCommunicator: SmsCommunicator

View file

@ -1,10 +1,10 @@
package info.nightscout.source.activities
import android.os.Bundle
import info.nightscout.core.ui.activities.DialogAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.source.DexcomPlugin
class RequestDexcomPermissionActivity : DialogAppCompatActivity() {
class RequestDexcomPermissionActivity : TranslatedDaggerAppCompatActivity() {
private val requestCode = "AndroidAPS <3".map { it.code }.sum()

View file

@ -15,13 +15,13 @@ import androidx.core.view.updatePadding
import androidx.core.widget.NestedScrollView
import com.google.android.material.appbar.MaterialToolbar
import com.google.android.material.button.MaterialButton
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.plugins.sync.R
import info.nightscout.plugins.sync.di.AuthUrl
import info.nightscout.plugins.sync.di.ViewModelFactory
import info.nightscout.plugins.sync.R
import javax.inject.Inject
class OHLoginActivity : DaggerAppCompatActivity() {
class OHLoginActivity : TranslatedDaggerAppCompatActivity() {
@Inject
internal lateinit var viewModelFactory: ViewModelFactory

View file

@ -16,9 +16,9 @@ import androidx.databinding.DataBindingUtil
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.comboctl.base.BasicProgressStage
import info.nightscout.comboctl.base.PairingPIN
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.pump.combov2.ComboV2Plugin
import info.nightscout.pump.combov2.R
@ -72,7 +72,7 @@ private class BluetoothPermissionChecks(
}
}
class ComboV2PairingActivity : DaggerAppCompatActivity() {
class ComboV2PairingActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var aapsLogger: AAPSLogger
@Inject lateinit var rh: ResourceHelper

View file

@ -8,7 +8,7 @@ import android.widget.AdapterView
import android.widget.ArrayAdapter
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.interfaces.Constants
import info.nightscout.interfaces.plugin.ActivePlugin
@ -37,7 +37,7 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import javax.inject.Inject
class DanaHistoryActivity : DaggerAppCompatActivity() {
class DanaHistoryActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var rxBus: RxBus
@Inject lateinit var rh: ResourceHelper

View file

@ -2,7 +2,7 @@ package info.nightscout.pump.dana.activities
import android.content.Context
import android.os.Bundle
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.interfaces.Constants
import info.nightscout.interfaces.plugin.ActivePlugin
@ -26,7 +26,7 @@ import javax.inject.Inject
import kotlin.math.max
import kotlin.math.min
class DanaUserOptionsActivity : DaggerAppCompatActivity() {
class DanaUserOptionsActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var rxBus: RxBus
@Inject lateinit var aapsLogger: AAPSLogger

View file

@ -20,7 +20,7 @@ import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.TextView
import androidx.core.app.ActivityCompat
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.core.utils.extensions.safeEnable
import info.nightscout.interfaces.pump.BlePreCheck
@ -32,7 +32,7 @@ import info.nightscout.shared.sharedPreferences.SP
import java.util.regex.Pattern
import javax.inject.Inject
class BLEScanActivity : DaggerAppCompatActivity() {
class BLEScanActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var sp: SP
@Inject lateinit var blePreCheck: BlePreCheck

View file

@ -2,7 +2,7 @@ package info.nightscout.pump.danars.activities
import android.os.Bundle
import android.util.Base64
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.core.utils.hexStringToByteArray
@ -21,7 +21,7 @@ import io.reactivex.rxjava3.kotlin.plusAssign
import javax.inject.Inject
import kotlin.experimental.xor
class EnterPinActivity : DaggerAppCompatActivity() {
class EnterPinActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var fabricPrivacy: FabricPrivacy
@Inject lateinit var danaRSPlugin: DanaRSPlugin

View file

@ -4,10 +4,10 @@ import android.annotation.SuppressLint
import android.content.Intent
import android.content.pm.ActivityInfo
import android.os.Bundle
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.pump.danars.dialogs.PairingProgressDialog
class PairingHelperActivity : DaggerAppCompatActivity() {
class PairingHelperActivity : TranslatedDaggerAppCompatActivity() {
var dialog: PairingProgressDialog? = null

View file

@ -23,7 +23,7 @@ import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.TextView
import androidx.core.app.ActivityCompat
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.core.utils.extensions.safeEnable
import info.nightscout.interfaces.pump.BlePreCheck
@ -35,7 +35,7 @@ import info.nightscout.shared.sharedPreferences.SP
import java.util.UUID
import javax.inject.Inject
class DiaconnG8BLEScanActivity : DaggerAppCompatActivity() {
class DiaconnG8BLEScanActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var sp: SP
@Inject lateinit var blePreCheck: BlePreCheck

View file

@ -9,7 +9,7 @@ import android.widget.ArrayAdapter
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.interfaces.profile.ProfileFunction
@ -31,7 +31,7 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import javax.inject.Inject
class DiaconnG8HistoryActivity : DaggerAppCompatActivity() {
class DiaconnG8HistoryActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var profileFunction: ProfileFunction
@Inject lateinit var fabricPrivacy: FabricPrivacy

View file

@ -5,7 +5,7 @@ import android.os.Bundle
import android.view.View
import android.widget.AdapterView
import android.widget.ArrayAdapter
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.interfaces.plugin.ActivePlugin
@ -23,7 +23,7 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable
import java.text.DecimalFormat
import javax.inject.Inject
class DiaconnG8UserOptionsActivity : DaggerAppCompatActivity() {
class DiaconnG8UserOptionsActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var fabricPrivacy: FabricPrivacy
@Inject lateinit var context: Context

View file

@ -8,14 +8,14 @@ import info.nightscout.androidaps.plugins.pump.eopatch.event.EventProgressDialog
import info.nightscout.androidaps.plugins.pump.eopatch.ui.dialogs.AlarmDialog
import info.nightscout.androidaps.plugins.pump.eopatch.ui.dialogs.ProgressDialogHelper
import info.nightscout.core.ui.R
import info.nightscout.core.ui.activities.DialogAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.rx.AapsSchedulers
import info.nightscout.rx.bus.RxBus
import info.nightscout.shared.sharedPreferences.SP
import io.reactivex.rxjava3.disposables.CompositeDisposable
import javax.inject.Inject
class AlarmHelperActivity : DialogAppCompatActivity() {
class AlarmHelperActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var sp : SP
@Inject lateinit var rxBus: RxBus
@Inject lateinit var aapsSchedulers: AapsSchedulers

View file

@ -3,9 +3,9 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ui
import android.os.Bundle
import info.nightscout.androidaps.plugins.pump.eopatch.ui.dialogs.ActivationNotCompleteDialog
import info.nightscout.core.ui.R
import info.nightscout.core.ui.activities.DialogAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
class DialogHelperActivity : DialogAppCompatActivity() {
class DialogHelperActivity : TranslatedDaggerAppCompatActivity() {
@Override
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

View file

@ -7,14 +7,15 @@ import androidx.annotation.LayoutRes
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import androidx.lifecycle.ViewModelProvider
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.plugins.pump.eopatch.dagger.EopatchPluginQualifier
import info.nightscout.core.ui.R
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.rx.AapsSchedulers
import io.reactivex.rxjava3.disposables.CompositeDisposable
import javax.inject.Inject
abstract class EoBaseActivity<B : ViewDataBinding> : DaggerAppCompatActivity(), EoBaseNavigator {
abstract class EoBaseActivity<B : ViewDataBinding> : TranslatedDaggerAppCompatActivity(), EoBaseNavigator {
@Inject
@EopatchPluginQualifier
lateinit var viewModelFactory: ViewModelProvider.Factory
@ -48,7 +49,7 @@ abstract class EoBaseActivity<B : ViewDataBinding> : DaggerAppCompatActivity(),
}
override fun finish(finishAffinity: Boolean) {
if(finishAffinity) {
if (finishAffinity) {
finishAffinity()
} else {
finish()

View file

@ -3,10 +3,10 @@ package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.
import androidx.appcompat.app.AlertDialog
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
abstract class OmnipodWizardActivityBase : DaggerAppCompatActivity() {
abstract class OmnipodWizardActivityBase : TranslatedDaggerAppCompatActivity() {
override fun onBackPressed() = exitActivityAfterConfirmation()

View file

@ -11,7 +11,6 @@ import android.widget.Spinner
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType
import info.nightscout.androidaps.plugins.pump.omnipod.dash.R
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.DashHistory
@ -21,6 +20,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.History
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.InitialResult
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.ResolvedResult
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.TempBasalRecord
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.utils.DateTimeUtil
import info.nightscout.interfaces.pump.defs.PumpType
import info.nightscout.pump.common.defs.PumpHistoryEntryGroup
@ -33,7 +33,7 @@ import java.util.Calendar
import java.util.GregorianCalendar
import javax.inject.Inject
class DashPodHistoryActivity : DaggerAppCompatActivity() {
class DashPodHistoryActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var dashHistory: DashHistory
@Inject lateinit var aapsSchedulers: AapsSchedulers

View file

@ -4,7 +4,6 @@ import android.content.Context
import android.content.Intent
import android.os.Bundle
import dagger.android.HasAndroidInjector
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandPlayTestBeep
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.PodActivationWizardActivity
import info.nightscout.androidaps.plugins.pump.omnipod.dash.databinding.OmnipodDashPodManagementBinding
@ -12,6 +11,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definitio
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.activation.DashPodActivationWizardActivity
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.deactivation.DashPodDeactivationWizardActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.interfaces.queue.Callback
@ -26,7 +26,7 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import javax.inject.Inject
class DashPodManagementActivity : DaggerAppCompatActivity() {
class DashPodManagementActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var fabricPrivacy: FabricPrivacy
@Inject lateinit var commandQueue: CommandQueue

View file

@ -6,7 +6,6 @@ import android.os.Bundle
import android.os.Handler
import android.os.HandlerThread
import dagger.android.HasAndroidInjector
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusActivity
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData
@ -24,6 +23,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodE
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandReadPulseLog
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.ErosPodActivationWizardActivity
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.ErosPodDeactivationWizardActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.interfaces.Config
@ -42,7 +42,7 @@ import javax.inject.Inject
/**
* Created by andy on 30/08/2019
*/
class ErosPodManagementActivity : DaggerAppCompatActivity() {
class ErosPodManagementActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var fabricPrivacy: FabricPrivacy
@Inject lateinit var commandQueue: CommandQueue

View file

@ -20,7 +20,7 @@ import android.widget.AdapterView
import android.widget.AdapterView.OnItemClickListener
import android.widget.BaseAdapter
import android.widget.TextView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.interfaces.pump.BlePreCheck
@ -37,7 +37,7 @@ import org.apache.commons.lang3.StringUtils
import javax.inject.Inject
@SuppressLint("MissingPermission")
class PumpBLEConfigActivity : DaggerAppCompatActivity() {
class PumpBLEConfigActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var activePlugin: ActivePlugin
@Inject lateinit var sp: SP

View file

@ -11,7 +11,7 @@ import android.widget.ArrayAdapter
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.pump.common.R
import info.nightscout.pump.common.databinding.PumpHistoryActivityBinding
@ -22,12 +22,10 @@ import info.nightscout.pump.common.driver.history.PumpHistoryEntry
import info.nightscout.pump.common.driver.history.PumpHistoryText
import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag
import info.nightscout.shared.interfaces.ResourceHelper
import javax.inject.Inject
class PumpHistoryActivity : DaggerAppCompatActivity() {
class PumpHistoryActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var resourceHelper: ResourceHelper
@Inject lateinit var aapsLogger: AAPSLogger
@Inject lateinit var activePlugin: ActivePlugin
@Inject lateinit var context: Context

View file

@ -26,13 +26,13 @@ import android.widget.BaseAdapter
import android.widget.TextView
import android.widget.Toast
import androidx.core.app.ActivityCompat
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.R
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.databinding.RileyLinkBleConfigActivityBinding
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkPumpDevice
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.interfaces.pump.BlePreCheck
@ -45,7 +45,7 @@ import java.util.Locale
import javax.inject.Inject
// IMPORTANT: This activity needs to be called from RileyLinkSelectPreference (see pref_medtronic.xml as example)
class RileyLinkBLEConfigActivity : DaggerAppCompatActivity() {
class RileyLinkBLEConfigActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var sp: SP
@Inject lateinit var blePreCheck: BlePreCheck

View file

@ -5,13 +5,13 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.google.android.material.tabs.TabLayoutMediator
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.R
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.databinding.RileylinkStatusBinding
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.shared.interfaces.ResourceHelper
import javax.inject.Inject
class RileyLinkStatusActivity : DaggerAppCompatActivity() {
class RileyLinkStatusActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var rh: ResourceHelper

View file

@ -1,10 +1,10 @@
package info.nightscout.ui.activities
import android.os.Bundle
import info.nightscout.core.ui.activities.DialogAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.ui.dialogs.BolusProgressDialog
class BolusProgressHelperActivity : DialogAppCompatActivity() {
class BolusProgressHelperActivity : TranslatedDaggerAppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
BolusProgressDialog()

View file

@ -1,17 +1,17 @@
package info.nightscout.ui.activities
import android.os.Bundle
import info.nightscout.ui.services.AlarmSoundService
import info.nightscout.core.ui.activities.DialogAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.database.impl.AppRepository
import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction
import info.nightscout.shared.sharedPreferences.SP
import info.nightscout.ui.alertDialogs.ErrorDialog
import info.nightscout.ui.services.AlarmSoundService
import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import javax.inject.Inject
class ErrorHelperActivity : DialogAppCompatActivity() {
class ErrorHelperActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var sp: SP
@Inject lateinit var repository: AppRepository

View file

@ -8,8 +8,8 @@ import android.widget.ArrayAdapter
import android.widget.TextView
import com.google.android.material.tabs.TabLayout
import com.google.common.collect.Lists
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.profile.ProfileSealed
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.core.utils.fabric.FabricPrivacy
@ -38,7 +38,7 @@ import io.reactivex.rxjava3.kotlin.plusAssign
import java.text.DecimalFormat
import javax.inject.Inject
class ProfileHelperActivity : DaggerAppCompatActivity() {
class ProfileHelperActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var tddCalculator: TddCalculator
@Inject lateinit var profileFunction: ProfileFunction

View file

@ -14,7 +14,7 @@ import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.utils.ActionModeHelper
import info.nightscout.core.utils.fabric.FabricPrivacy
@ -38,7 +38,7 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import javax.inject.Inject
class QuickWizardListActivity : DaggerAppCompatActivity(), OnStartDragListener {
class QuickWizardListActivity : TranslatedDaggerAppCompatActivity(), OnStartDragListener {
@Inject lateinit var aapsSchedulers: AapsSchedulers
@Inject lateinit var rxBus: RxBus

View file

@ -5,7 +5,7 @@ import android.os.Bundle
import android.os.Handler
import android.os.HandlerThread
import android.widget.TextView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.database.entities.UserEntry.Action
@ -25,7 +25,7 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import javax.inject.Inject
class StatsActivity : DaggerAppCompatActivity() {
class StatsActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var tddCalculator: TddCalculator
@Inject lateinit var tirCalculator: TirCalculator

View file

@ -2,7 +2,7 @@ package info.nightscout.ui.activities
import android.os.Bundle
import android.widget.ArrayAdapter
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.ui.toast.ToastUtils
import info.nightscout.core.utils.fabric.InstanceId
import info.nightscout.interfaces.plugin.ActivePlugin
@ -15,7 +15,7 @@ import info.nightscout.ui.databinding.ActivitySurveyBinding
import info.nightscout.ui.defaultProfile.DefaultProfile
import javax.inject.Inject
class SurveyActivity : DaggerAppCompatActivity() {
class SurveyActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var activePlugin: ActivePlugin
@Inject lateinit var profileFunction: ProfileFunction

View file

@ -14,7 +14,7 @@ import android.widget.EditText
import android.widget.TableLayout
import android.widget.TableRow
import android.widget.TextView
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.database.entities.TotalDailyDose
import info.nightscout.database.impl.AppRepository
@ -43,7 +43,7 @@ import javax.inject.Inject
import kotlin.math.min
import kotlin.math.roundToInt
class TDDStatsActivity : DaggerAppCompatActivity() {
class TDDStatsActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var sp: SP
@Inject lateinit var profileFunction: ProfileFunction

View file

@ -5,7 +5,7 @@ import android.view.MenuItem
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import com.google.android.material.tabs.TabLayout
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.interfaces.Config
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.shared.extensions.toVisibility
@ -21,7 +21,7 @@ import info.nightscout.ui.activities.fragments.TreatmentsUserEntryFragment
import info.nightscout.ui.databinding.TreatmentsFragmentBinding
import javax.inject.Inject
class TreatmentsActivity : DaggerAppCompatActivity() {
class TreatmentsActivity : TranslatedDaggerAppCompatActivity() {
@Inject lateinit var config: Config
@Inject lateinit var activePlugin: ActivePlugin

View file

@ -10,7 +10,7 @@ import android.view.ViewGroup
import android.view.Window
import android.view.WindowManager
import dagger.android.support.DaggerDialogFragment
import info.nightscout.core.ui.activities.DialogAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.database.entities.UserEntry.Action
import info.nightscout.database.entities.UserEntry.Sources
import info.nightscout.interfaces.logging.UserEntryLogger
@ -26,7 +26,7 @@ class ErrorDialog : DaggerDialogFragment() {
@Inject lateinit var aapsLogger: AAPSLogger
@Inject lateinit var uel: UserEntryLogger
var helperActivity: DialogAppCompatActivity? = null
var helperActivity: TranslatedDaggerAppCompatActivity? = null
var status: String = ""
var title: String = ""
var sound: Int = 0

View file

@ -8,7 +8,7 @@ import android.view.ViewGroup
import android.view.Window
import android.view.WindowManager
import dagger.android.support.DaggerDialogFragment
import info.nightscout.core.ui.activities.DialogAppCompatActivity
import info.nightscout.core.ui.activities.TranslatedDaggerAppCompatActivity
import info.nightscout.database.entities.UserEntry.Action
import info.nightscout.database.entities.UserEntry.Sources
import info.nightscout.interfaces.logging.UserEntryLogger
@ -42,7 +42,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
private var amount = 0.0
private var id: Long = 0L
private var state: String? = null
private var helpActivity: DialogAppCompatActivity? = null
private var helpActivity: TranslatedDaggerAppCompatActivity? = null
fun setId(id: Long): BolusProgressDialog {
this.id = id
@ -55,7 +55,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
return this
}
fun setHelperActivity(activity: DialogAppCompatActivity): BolusProgressDialog {
fun setHelperActivity(activity: TranslatedDaggerAppCompatActivity): BolusProgressDialog {
helpActivity = activity
return this
}