Material style for app

This commit is contained in:
Milos Kozak 2022-02-23 19:05:55 +01:00
parent d39e9e9cf3
commit e924c28542
94 changed files with 953 additions and 671 deletions

View file

@ -109,7 +109,7 @@ android {
defaultConfig {
multiDexEnabled true
versionCode 1500
version "3.0.0.1-dev-a"
version "3.0.0.1-dev-b"
buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'

View file

@ -64,6 +64,7 @@
</activity>
<activity android:name=".activities.PreferencesActivity" />
<activity android:name=".plugins.general.overview.activities.QuickWizardListActivity"
android:theme="@style/AppTheme"
android:exported="false">
<intent-filter>
<action android:name="info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity" />
@ -75,8 +76,7 @@
<activity android:name=".activities.HistoryBrowseActivity" />
<activity android:name=".activities.TreatmentsActivity" />
<activity android:name=".activities.SurveyActivity" />
<activity android:name=".activities.ProfileHelperActivity"
android:theme="@style/ProfileHelperAppTheme" />
<activity android:name=".activities.ProfileHelperActivity" />
<activity android:name=".activities.StatsActivity" />
<activity
android:name="com.google.firebase.auth.internal.FederatedSignInActivity"
@ -229,8 +229,7 @@
<activity
android:name=".setupwizard.SetupWizardActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/title_activity_setup_wizard"
android:theme="@style/AppTheme.NoActionBar" />
android:label="@string/title_activity_setup_wizard" />
<activity
android:name=".activities.SingleFragmentActivity"

View file

@ -320,7 +320,7 @@ class MainActivity : NoSplashAppCompatActivity() {
message += rh.gs(R.string.about_link_urls)
val messageSpanned = SpannableString(message)
Linkify.addLinks(messageSpanned, Linkify.WEB_URLS)
AlertDialog.Builder(this)
AlertDialog.Builder(this, R.style.DialogTheme)
.setTitle(rh.gs(R.string.app_name) + " " + BuildConfig.VERSION)
.setIcon(iconsProvider.getIcon())
.setMessage(messageSpanned)

View file

@ -179,7 +179,8 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
val cal = Calendar.getInstance()
cal.timeInMillis = overviewData.fromTime
DatePickerDialog(
this, dateSetListener,
this, R.style.MaterialPickerTheme,
dateSetListener,
cal.get(Calendar.YEAR),
cal.get(Calendar.MONTH),
cal.get(Calendar.DAY_OF_MONTH)

View file

@ -283,7 +283,7 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() {
tabSelected = tab
typeSelected[tabSelected] = newContent
binding.profiletypeTitle.defaultHintTextColor = ColorStateList.valueOf(rh.gc(if (tab == 0) R.color.tabBgColorSelected else R.color.examinedProfile))
binding.profiletypeTitle.defaultHintTextColor = ColorStateList.valueOf(rh.gc(if (tab == 0) R.color.helperProfile else R.color.examinedProfile))
// show new content
binding.profiletype.setText(
@ -314,7 +314,7 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() {
}
private fun setBackgroundColorOnSelected(tab: Int) {
binding.menu1.setBackgroundColor(rh.gc(if (tab == 1) R.color.defaultbackground else R.color.tempbasal))
binding.menu1.setBackgroundColor(rh.gc(if (tab == 1) R.color.defaultbackground else R.color.helperProfile))
binding.menu2.setBackgroundColor(rh.gc(if (tab == 0) R.color.defaultbackground else R.color.examinedProfile))
}
}

View file

@ -9,6 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import dagger.android.support.DaggerFragment
import info.nightscout.androidaps.R
import info.nightscout.androidaps.activities.fragments.TreatmentsProfileSwitchFragment.RecyclerProfileViewAdapter.ProfileSwitchViewHolder
import info.nightscout.androidaps.data.ProfileSealed
import info.nightscout.androidaps.database.AppRepository
import info.nightscout.androidaps.database.entities.UserEntry.Action
@ -18,20 +19,17 @@ import info.nightscout.androidaps.database.transactions.InvalidateProfileSwitchT
import info.nightscout.androidaps.databinding.TreatmentsProfileswitchFragmentBinding
import info.nightscout.androidaps.databinding.TreatmentsProfileswitchItemBinding
import info.nightscout.androidaps.dialogs.ProfileViewerDialog
import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged
import info.nightscout.androidaps.events.EventProfileSwitchChanged
import info.nightscout.androidaps.events.EventTreatmentUpdateGui
import info.nightscout.androidaps.extensions.getCustomizedName
import info.nightscout.androidaps.extensions.toVisibility
import info.nightscout.shared.logging.AAPSLogger
import info.nightscout.shared.logging.LTag
import info.nightscout.androidaps.logging.UserEntryLogger
import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientRestart
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventNewHistoryData
import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin
import info.nightscout.androidaps.plugins.profile.local.events.EventLocalProfileChanged
import info.nightscout.androidaps.events.EventTreatmentUpdateGui
import info.nightscout.androidaps.activities.fragments.TreatmentsProfileSwitchFragment.RecyclerProfileViewAdapter.ProfileSwitchViewHolder
import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.T
@ -39,6 +37,8 @@ import info.nightscout.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
import info.nightscout.androidaps.utils.resources.ResourceHelper
import info.nightscout.androidaps.utils.rx.AapsSchedulers
import info.nightscout.shared.logging.AAPSLogger
import info.nightscout.shared.logging.LTag
import info.nightscout.shared.sharedPreferences.SP
import io.reactivex.Completable
import io.reactivex.disposables.CompositeDisposable
@ -186,7 +186,8 @@ class TreatmentsProfileSwitchFragment : DaggerFragment() {
holder.binding.date.text = dateUtil.dateString(profileSwitch.timestamp)
holder.binding.time.text = dateUtil.timeString(profileSwitch.timestamp)
holder.binding.duration.text = rh.gs(R.string.format_mins, T.msecs(profileSwitch.duration ?: 0L).mins())
holder.binding.name.text = if (profileSwitch is ProfileSealed.PS) profileSwitch.value.getCustomizedName() else if (profileSwitch is ProfileSealed.EPS) profileSwitch.value.originalCustomizedName else ""
holder.binding.name.text =
if (profileSwitch is ProfileSealed.PS) profileSwitch.value.getCustomizedName() else if (profileSwitch is ProfileSealed.EPS) profileSwitch.value.originalCustomizedName else ""
if (profileSwitch.isInProgress(dateUtil)) holder.binding.date.setTextColor(rh.gc(R.color.colorActive))
else holder.binding.date.setTextColor(holder.binding.duration.currentTextColor)
holder.binding.remove.tag = profileSwitch
@ -198,7 +199,6 @@ class TreatmentsProfileSwitchFragment : DaggerFragment() {
holder.binding.remove.visibility = (profileSwitch is ProfileSealed.PS).toVisibility()
holder.binding.clone.visibility = (profileSwitch is ProfileSealed.PS).toVisibility()
holder.binding.spacer.visibility = (profileSwitch is ProfileSealed.PS).toVisibility()
holder.binding.root.setBackgroundColor(rh.gc(if (profileSwitch is ProfileSealed.PS) R.color.defaultbackground else R.color.list_delimiter))
val nextTimestamp = if (profileSwitchList.size != position + 1) profileSwitchList[position + 1].timestamp else 0L
holder.binding.delimiter.visibility = dateUtil.isSameDay(profileSwitch.timestamp, nextTimestamp).toVisibility()
}
@ -218,8 +218,10 @@ class TreatmentsProfileSwitchFragment : DaggerFragment() {
OKDialog.showConfirmation(activity, rh.gs(R.string.removerecord),
rh.gs(R.string.careportal_profileswitch) + ": " + profileSwitch.profileName +
"\n" + rh.gs(R.string.date) + ": " + dateUtil.dateAndTimeString(profileSwitch.timestamp), Runnable {
uel.log(Action.PROFILE_SWITCH_REMOVED, Sources.Treatments, profileSwitch.profileName,
ValueWithUnit.Timestamp(profileSwitch.timestamp))
uel.log(
Action.PROFILE_SWITCH_REMOVED, Sources.Treatments, profileSwitch.profileName,
ValueWithUnit.Timestamp(profileSwitch.timestamp)
)
disposable += repository.runTransactionForResult(InvalidateProfileSwitchTransaction(profileSwitch.id))
.subscribe(
{ result -> result.invalidated.forEach { aapsLogger.debug(LTag.DATABASE, "Invalidated ProfileSwitch $it") } },
@ -232,13 +234,24 @@ class TreatmentsProfileSwitchFragment : DaggerFragment() {
activity?.let { activity ->
val profileSwitch = (it.tag as ProfileSealed.PS).value
val profileSealed = it.tag as ProfileSealed
OKDialog.showConfirmation(activity, rh.gs(R.string.careportal_profileswitch), rh.gs(R.string.copytolocalprofile) + "\n" + profileSwitch.getCustomizedName() + "\n" + dateUtil.dateAndTimeString(profileSwitch.timestamp), Runnable {
uel.log(Action.PROFILE_SWITCH_CLONED, Sources.Treatments,
OKDialog.showConfirmation(
activity,
rh.gs(R.string.careportal_profileswitch),
rh.gs(R.string.copytolocalprofile) + "\n" + profileSwitch.getCustomizedName() + "\n" + dateUtil.dateAndTimeString(profileSwitch.timestamp),
Runnable {
uel.log(
Action.PROFILE_SWITCH_CLONED, Sources.Treatments,
profileSwitch.getCustomizedName() + " " + dateUtil.dateAndTimeString(profileSwitch.timestamp).replace(".", "_"),
ValueWithUnit.Timestamp(profileSwitch.timestamp),
ValueWithUnit.SimpleString(profileSwitch.profileName))
ValueWithUnit.SimpleString(profileSwitch.profileName)
)
val nonCustomized = profileSealed.convertToNonCustomizedProfile(dateUtil)
localProfilePlugin.addProfile(localProfilePlugin.copyFrom(nonCustomized, profileSwitch.getCustomizedName() + " " + dateUtil.dateAndTimeString(profileSwitch.timestamp).replace(".", "_")))
localProfilePlugin.addProfile(
localProfilePlugin.copyFrom(
nonCustomized,
profileSwitch.getCustomizedName() + " " + dateUtil.dateAndTimeString(profileSwitch.timestamp).replace(".", "_")
)
)
rxBus.send(EventLocalProfileChanged())
})
}

View file

@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.MenuItem
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
@ -12,26 +13,30 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.ItemTouchHelper.*
import androidx.recyclerview.widget.ItemTouchHelper.ACTION_STATE_DRAG
import androidx.recyclerview.widget.ItemTouchHelper.DOWN
import androidx.recyclerview.widget.ItemTouchHelper.END
import androidx.recyclerview.widget.ItemTouchHelper.START
import androidx.recyclerview.widget.ItemTouchHelper.UP
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import info.nightscout.androidaps.R
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
import info.nightscout.androidaps.activities.DaggerAppCompatActivityWithResult
import info.nightscout.androidaps.databinding.OverviewQuickwizardlistActivityBinding
import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.general.overview.dialogs.EditQuickWizardDialog
import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
import io.reactivex.rxkotlin.plusAssign
import info.nightscout.androidaps.utils.rx.AapsSchedulers
import info.nightscout.androidaps.utils.wizard.QuickWizard
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry
import info.nightscout.shared.sharedPreferences.SP
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign
import javax.inject.Inject
class QuickWizardListActivity : NoSplashAppCompatActivity() {
class QuickWizardListActivity : DaggerAppCompatActivityWithResult() {
@Inject lateinit var aapsSchedulers: AapsSchedulers
@Inject lateinit var rxBus: RxBus
@ -176,6 +181,10 @@ class QuickWizardListActivity : NoSplashAppCompatActivity() {
binding = OverviewQuickwizardlistActivityBinding.inflate(layoutInflater)
setContentView(binding.root)
title = rh.gs(R.string.quickwizard)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setDisplayShowHomeEnabled(true)
binding.recyclerview.setHasFixedSize(true)
binding.recyclerview.layoutManager = LinearLayoutManager(this)
binding.recyclerview.adapter = RecyclerViewAdapter(supportFragmentManager)
@ -203,4 +212,14 @@ class QuickWizardListActivity : NoSplashAppCompatActivity() {
disposable.clear()
super.onPause()
}
override fun onOptionsItemSelected(item: MenuItem): Boolean =
when (item.itemId) {
android.R.id.home -> {
finish()
true
}
else -> false
}
}

View file

@ -105,7 +105,8 @@ class EditQuickWizardDialog : DaggerDialogFragment(), View.OnClickListener {
binding.from.setOnClickListener {
context?.let {
TimePickerDialog(
it, fromTimeSetListener,
it, R.style.MaterialPickerTheme,
fromTimeSetListener,
T.secs(fromSeconds.toLong()).hours().toInt(),
T.secs((fromSeconds % 3600).toLong()).mins().toInt(),
DateFormat.is24HourFormat(context)
@ -123,7 +124,8 @@ class EditQuickWizardDialog : DaggerDialogFragment(), View.OnClickListener {
binding.to.setOnClickListener {
context?.let {
TimePickerDialog(
it, toTimeSetListener,
it, R.style.MaterialPickerTheme,
toTimeSetListener,
T.secs(toSeconds.toLong()).hours().toInt(),
T.secs((toSeconds % 3600).toLong()).mins().toInt(),
DateFormat.is24HourFormat(context)

View file

@ -24,11 +24,13 @@ import info.nightscout.androidaps.interfaces.Profile
import info.nightscout.androidaps.logging.UserEntryLogger
import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.profile.local.events.EventLocalProfileChanged
import info.nightscout.androidaps.utils.*
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.DecimalFormatter
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.HardLimits
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.androidaps.utils.resources.ResourceHelper
import info.nightscout.androidaps.utils.rx.AapsSchedulers
import info.nightscout.androidaps.utils.ui.SpinnerHelper
import info.nightscout.androidaps.utils.ui.TimeListEdit
import info.nightscout.shared.SafeParse
import info.nightscout.shared.logging.AAPSLogger
@ -54,12 +56,12 @@ class LocalProfileFragment : DaggerFragment() {
private var disposable: CompositeDisposable = CompositeDisposable()
private var basalView: TimeListEdit? = null
private var spinner: SpinnerHelper? = null
// private var spinner: SpinnerHelper? = null
private val save = Runnable {
doEdit()
basalView?.updateLabel(rh.gs(R.string.basal_label) + ": " + sumLabel())
localProfilePlugin.profile?.getSpecificProfile(spinner?.selectedItem.toString())?.let {
localProfilePlugin.profile?.getSpecificProfile(binding.profileList.text.toString())?.let {
binding.basalGraph.show(ProfileSealed.Pure(it))
binding.icGraph.show(ProfileSealed.Pure(it))
binding.isfGraph.show(ProfileSealed.Pure(it))
@ -135,46 +137,109 @@ class LocalProfileFragment : DaggerFragment() {
binding.name.addTextChangedListener(textWatch)
binding.dia.setParams(currentProfile.dia, hardLimits.minDia(), hardLimits.maxDia(), 0.1, DecimalFormat("0.0"), false, null, textWatch)
binding.dia.tag = "LP_DIA"
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.ic_holder, "IC", rh.gs(R.string.ic_long_label), currentProfile.ic, null, doubleArrayOf(hardLimits.minIC(), hardLimits.maxIC()), null, 0.1, DecimalFormat ("0.0"), save)
basalView = TimeListEdit(context, aapsLogger, dateUtil, view, R.id.basal_holder, "BASAL", rh.gs(R.string.basal_long_label) + ": " + sumLabel(), currentProfile.basal, null, doubleArrayOf(pumpDescription.basalMinimumRate, pumpDescription.basalMaximumRate), null, 0.01, DecimalFormat("0.00"), save)
TimeListEdit(
context,
aapsLogger,
dateUtil,
view,
R.id.ic_holder,
"IC",
rh.gs(R.string.ic_long_label),
currentProfile.ic,
null,
doubleArrayOf(hardLimits.minIC(), hardLimits.maxIC()),
null,
0.1,
DecimalFormat("0.0"),
save
)
basalView =
TimeListEdit(
context,
aapsLogger,
dateUtil,
view,
R.id.basal_holder,
"BASAL",
rh.gs(R.string.basal_long_label) + ": " + sumLabel(),
currentProfile.basal,
null,
doubleArrayOf(pumpDescription.basalMinimumRate, pumpDescription.basalMaximumRate),
null,
0.01,
DecimalFormat("0.00"),
save
)
if (units == Constants.MGDL) {
val isfRange = doubleArrayOf(HardLimits.MIN_ISF, HardLimits.MAX_ISF)
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.isf_holder, "ISF", rh.gs(R.string.isf_long_label), currentProfile.isf, null, isfRange , null, 1.0, DecimalFormat("0"), save)
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.target_holder, "TARGET", rh.gs(R.string.target_long_label), currentProfile.targetLow, currentProfile.targetHigh, HardLimits.VERY_HARD_LIMIT_MIN_BG, HardLimits.VERY_HARD_LIMIT_TARGET_BG, 1.0, DecimalFormat("0"), save)
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.isf_holder, "ISF", rh.gs(R.string.isf_long_label), currentProfile.isf, null, isfRange, null, 1.0, DecimalFormat("0"), save)
TimeListEdit(
context,
aapsLogger,
dateUtil,
view,
R.id.target_holder,
"TARGET",
rh.gs(R.string.target_long_label),
currentProfile.targetLow,
currentProfile.targetHigh,
HardLimits.VERY_HARD_LIMIT_MIN_BG,
HardLimits.VERY_HARD_LIMIT_TARGET_BG,
1.0,
DecimalFormat("0"),
save
)
} else {
val isfRange = doubleArrayOf(roundUp(Profile.fromMgdlToUnits(HardLimits.MIN_ISF, GlucoseUnit.MMOL)),
roundDown(Profile.fromMgdlToUnits(HardLimits.MAX_ISF, GlucoseUnit.MMOL)))
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.isf_holder, "ISF", rh.gs(R.string.isf_long_label), currentProfile.isf, null,isfRange , null, 0.1, DecimalFormat("0.0"), save)
val range1 = doubleArrayOf(roundUp(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MIN_BG[0], GlucoseUnit.MMOL)),
roundDown(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MIN_BG[1], GlucoseUnit.MMOL)))
val range2 = doubleArrayOf(roundUp(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MAX_BG[0], GlucoseUnit.MMOL)),
roundDown(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MAX_BG[1], GlucoseUnit.MMOL)))
val isfRange = doubleArrayOf(
roundUp(Profile.fromMgdlToUnits(HardLimits.MIN_ISF, GlucoseUnit.MMOL)),
roundDown(Profile.fromMgdlToUnits(HardLimits.MAX_ISF, GlucoseUnit.MMOL))
)
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.isf_holder, "ISF", rh.gs(R.string.isf_long_label), currentProfile.isf, null, isfRange, null, 0.1, DecimalFormat("0.0"), save)
val range1 = doubleArrayOf(
roundUp(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MIN_BG[0], GlucoseUnit.MMOL)),
roundDown(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MIN_BG[1], GlucoseUnit.MMOL))
)
val range2 = doubleArrayOf(
roundUp(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MAX_BG[0], GlucoseUnit.MMOL)),
roundDown(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MAX_BG[1], GlucoseUnit.MMOL))
)
Log.i("TimeListEdit", "build: range1" + range1[0] + " " + range1[1] + " range2" + range2[0] + " " + range2[1])
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.target_holder, "TARGET", rh.gs(R.string.target_long_label), currentProfile.targetLow, currentProfile.targetHigh, range1 , range2, 0.1, DecimalFormat("0.0"), save)
TimeListEdit(
context,
aapsLogger,
dateUtil,
view,
R.id.target_holder,
"TARGET",
rh.gs(R.string.target_long_label),
currentProfile.targetLow,
currentProfile.targetHigh,
range1,
range2,
0.1,
DecimalFormat("0.0"),
save
)
}
// Spinner
spinner = SpinnerHelper(binding.spinner)
context?.let { context ->
val profileList: ArrayList<CharSequence> = localProfilePlugin.profile?.getProfileList() ?: ArrayList()
spinner?.adapter = ArrayAdapter(context, R.layout.spinner_centered, profileList)
val selection = localProfilePlugin.currentProfileIndex
if (selection in 0 until profileList.size) spinner?.setSelection(selection)
binding.profileList.setAdapter(ArrayAdapter(context, R.layout.spinner_centered, profileList))
} ?: return
spinner?.setOnItemSelectedListener(object : AdapterView.OnItemSelectedListener {
override fun onNothingSelected(parent: AdapterView<*>?) {
}
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
binding.profileList.onItemClickListener = AdapterView.OnItemClickListener { _, _, position, _ ->
if (localProfilePlugin.isEdited) {
activity?.let { activity ->
OKDialog.showConfirmation(activity, rh.gs(R.string.doyouwantswitchprofile), {
OKDialog.showConfirmation(
activity, rh.gs(R.string.doyouwantswitchprofile),
{
localProfilePlugin.currentProfileIndex = position
localProfilePlugin.isEdited = false
build()
}, {
val selection = localProfilePlugin.currentProfileIndex
if (selection in 0 until (spinner?.adapter?.count ?: -1)) spinner?.setSelection(selection)
if (selection in 0 until (binding.profileList.adapter?.count ?: -1)) binding.profileList.setSelection(selection)
}
)
}
@ -183,8 +248,7 @@ class LocalProfileFragment : DaggerFragment() {
build()
}
}
})
localProfilePlugin.profile?.getSpecificProfile(spinner?.selectedItem.toString())?.let {
localProfilePlugin.profile?.getSpecificProfile(binding.profileList.text.toString())?.let {
binding.basalGraph.show(ProfileSealed.Pure(it))
binding.icGraph.show(ProfileSealed.Pure(it))
binding.isfGraph.show(ProfileSealed.Pure(it))
@ -206,8 +270,12 @@ class LocalProfileFragment : DaggerFragment() {
if (localProfilePlugin.isEdited) {
activity?.let { OKDialog.show(it, "", rh.gs(R.string.saveorresetchangesfirst)) }
} else {
uel.log(Action.CLONE_PROFILE, Sources.LocalProfile, ValueWithUnit.SimpleString(localProfilePlugin.currentProfile()?.name
?: ""))
uel.log(
Action.CLONE_PROFILE, Sources.LocalProfile, ValueWithUnit.SimpleString(
localProfilePlugin.currentProfile()?.name
?: ""
)
)
localProfilePlugin.cloneProfile()
build()
}
@ -216,8 +284,12 @@ class LocalProfileFragment : DaggerFragment() {
binding.profileRemove.setOnClickListener {
activity?.let { activity ->
OKDialog.showConfirmation(activity, rh.gs(R.string.deletecurrentprofile), {
uel.log(Action.PROFILE_REMOVED, Sources.LocalProfile, ValueWithUnit.SimpleString(localProfilePlugin.currentProfile()?.name
?: ""))
uel.log(
Action.PROFILE_REMOVED, Sources.LocalProfile, ValueWithUnit.SimpleString(
localProfilePlugin.currentProfile()?.name
?: ""
)
)
localProfilePlugin.removeCurrentProfile()
build()
}, null)
@ -245,8 +317,12 @@ class LocalProfileFragment : DaggerFragment() {
if (!localProfilePlugin.isValidEditState(activity)) {
return@setOnClickListener //Should not happen as saveButton should not be visible if not valid
}
uel.log(Action.STORE_PROFILE, Sources.LocalProfile, ValueWithUnit.SimpleString(localProfilePlugin.currentProfile()?.name
?: ""))
uel.log(
Action.STORE_PROFILE, Sources.LocalProfile, ValueWithUnit.SimpleString(
localProfilePlugin.currentProfile()?.name
?: ""
)
)
localProfilePlugin.storeSettings(activity)
build()
}
@ -294,7 +370,7 @@ class LocalProfileFragment : DaggerFragment() {
val isEdited = localProfilePlugin.isEdited
if (isValid) {
this.view?.setBackgroundColor(rh.gc(R.color.ok_background))
binding.spinner.isEnabled = true
binding.profileList.isEnabled = true
if (isEdited) {
//edited profile -> save first
@ -306,7 +382,7 @@ class LocalProfileFragment : DaggerFragment() {
}
} else {
this.view?.setBackgroundColor(rh.gc(R.color.error_background))
binding.spinner.isEnabled = false
binding.profileList.isEnabled = false
binding.profileswitch.visibility = View.GONE
binding.save.visibility = View.GONE //don't save an invalid profile
}

View file

@ -28,7 +28,7 @@ object PrefImportSummaryDialog {
@SuppressLint("InflateParams")
fun showSummary(context: Context, importOk: Boolean, importPossible: Boolean, prefs: Prefs, ok: (() -> Unit)?, cancel: (() -> Unit)? = null) {
@StyleRes val theme: Int = if (importOk) R.style.AppTheme else {
@StyleRes val theme: Int = if (importOk) R.style.DialogTheme else {
if (importPossible) R.style.AppThemeWarningDialog else R.style.AppThemeErrorDialog
}
@ -92,7 +92,7 @@ object PrefImportSummaryDialog {
webView.setBackgroundColor(Color.TRANSPARENT)
webView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null)
AlertDialogHelper.Builder(context, R.style.AppTheme)
AlertDialogHelper.Builder(context, R.style.DialogTheme)
.setCustomTitle(
AlertDialogHelper.buildCustomTitle(
context,

View file

@ -19,7 +19,7 @@ object TwoMessagesAlertDialog {
val secondMessageLayout = LayoutInflater.from(context).inflate(R.layout.dialog_alert_two_messages, null)
(secondMessageLayout.findViewById<View>(R.id.password_prompt_title) as TextView).text = secondMessage
val dialog = AlertDialogHelper.Builder(context)
AlertDialogHelper.Builder(context, R.style.DialogTheme)
.setMessage(message)
.setCustomTitle(
AlertDialogHelper.buildCustomTitle(
@ -40,7 +40,7 @@ object TwoMessagesAlertDialog {
if (cancel != null) runOnUiThread { cancel() }
}
.show()
dialog.setCanceledOnTouchOutside(false)
.setCanceledOnTouchOutside(false)
}
}

View file

@ -5,8 +5,8 @@
android:viewportHeight="24">
<path
android:pathData="M12.069,20.423c-4.644,0 -8.422,-3.779 -8.422,-8.423s3.778,-8.422 8.422,-8.422S20.492,7.355 20.492,12S16.713,20.423 12.069,20.423zM12.069,4.943c-3.891,0 -7.057,3.166 -7.057,7.057c0,3.891 3.166,7.057 7.057,7.057c3.891,0 7.057,-3.166 7.057,-7.057C19.126,8.109 15.961,4.943 12.069,4.943z"
android:fillColor="#67DFE8"/>
android:fillColor="@color/ic_local_activate"/>
<path
android:pathData="M9.945,16.362c-0.113,0 -0.227,-0.028 -0.33,-0.085c-0.217,-0.12 -0.353,-0.349 -0.353,-0.598V8.32c0,-0.249 0.135,-0.478 0.353,-0.598c0.218,-0.12 0.485,-0.112 0.694,0.021l5.827,3.679c0.198,0.125 0.318,0.343 0.318,0.577s-0.12,0.452 -0.318,0.577l-5.827,3.679C10.198,16.326 10.072,16.362 9.945,16.362zM10.627,9.559v4.881L14.493,12L10.627,9.559z"
android:fillColor="#67DFE8"/>
android:fillColor="@color/ic_local_activate"/>
</vector>

View file

@ -5,5 +5,5 @@
android:viewportHeight="24">
<path
android:pathData="M13.787,4.15c-4.338,0 -7.867,3.529 -7.867,7.867v5.193l-2.486,-2.485c-0.25,-0.248 -0.653,-0.248 -0.902,0c-0.249,0.249 -0.249,0.653 0,0.902l3.575,3.574c0.008,0.008 0.019,0.011 0.028,0.018c0.054,0.048 0.112,0.091 0.18,0.119c0.078,0.032 0.161,0.049 0.244,0.049s0.166,-0.017 0.244,-0.049c0.068,-0.028 0.126,-0.071 0.18,-0.119c0.008,-0.008 0.019,-0.01 0.028,-0.018l3.575,-3.574c0.249,-0.249 0.249,-0.653 0,-0.902c-0.249,-0.248 -0.653,-0.248 -0.902,0l-2.486,2.485v-5.193c0,-3.635 2.957,-6.592 6.591,-6.592c3.635,0 6.592,2.957 6.592,6.592c0,1.761 -0.686,3.415 -1.931,4.66c-0.249,0.249 -0.249,0.653 0,0.902c0.25,0.248 0.652,0.248 0.902,0c1.485,-1.486 2.304,-3.461 2.304,-5.563C21.654,7.68 18.125,4.15 13.787,4.15z"
android:fillColor="#E93057"/>
android:fillColor="@color/ic_local_reset"/>
</vector>

View file

@ -27,14 +27,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_profileswitch"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_actions_profileswitch"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_profileswitch"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -42,14 +42,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_temptarget"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_temptarget_high"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_temporarytarget"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -57,14 +57,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_settempbasal"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_actions_starttempbasal"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_tempbasal_button"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -72,15 +72,15 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_canceltempbasal"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_cancelbasal"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/canceltemp"
android:textSize="11sp"
android:visibility="gone"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -88,14 +88,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_extendedbolus"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_actions_startextbolus"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_extendedbolus_button"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -103,15 +103,15 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_extendedbolus_cancel"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_actions_cancelextbolus"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_extendedbolus_cancel_button"
android:textSize="11sp"
android:visibility="gone"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -141,14 +141,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_bgcheck"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_bgcheck"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_bgcheck"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -156,14 +156,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_fill"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_cp_pump_canula"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/primefill"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -171,13 +171,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_cgmsensorinsert"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_cgm_insert"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_cgmsensorinsert"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -185,13 +186,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_pumpbatterychange"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_pump_battery"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_pumpbatterychange"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -199,13 +201,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_note"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_note"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_note"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -213,13 +216,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_exercise"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_exercise"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_exercise"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -227,13 +231,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_announcement"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_announcement"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_announcement"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -241,13 +246,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_question"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_question"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_question"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -270,13 +276,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_historybrowser"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_pump_history"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/nav_historybrowser"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -284,14 +291,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_tddstats"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_cp_stats"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/tdd"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"

View file

@ -27,14 +27,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_profileswitch"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_actions_profileswitch"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_profileswitch"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -42,14 +42,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_temptarget"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_temptarget_high"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_temporarytarget"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -57,14 +57,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_settempbasal"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_actions_starttempbasal"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_tempbasal_button"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -72,15 +72,15 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_canceltempbasal"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_cancelbasal"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/canceltemp"
android:textSize="11sp"
android:visibility="gone"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -88,14 +88,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_extendedbolus"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_actions_startextbolus"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_extendedbolus_button"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -103,15 +103,15 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_extendedbolus_cancel"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_actions_cancelextbolus"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_extendedbolus_cancel_button"
android:textSize="11sp"
android:visibility="gone"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -141,14 +141,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_bgcheck"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_bgcheck"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_bgcheck"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -156,14 +156,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_fill"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_cp_pump_canula"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/primefill"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -171,13 +171,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_cgmsensorinsert"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_cgm_insert"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_cgmsensorinsert"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -185,13 +186,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_pumpbatterychange"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_pump_battery"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_pumpbatterychange"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -199,13 +201,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_note"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_note"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_note"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -213,13 +216,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_exercise"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_exercise"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_exercise"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -227,13 +231,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_announcement"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_announcement"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_announcement"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -241,13 +246,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_question"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:drawableTop="@drawable/ic_cp_question"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/careportal_question"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -270,13 +276,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_historybrowser"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_pump_history"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/nav_historybrowser"
android:textSize="11sp"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
@ -284,14 +291,14 @@
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/actions_tddstats"
style="@style/ButtonSmallFontStyle"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_cp_stats"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/tdd"
android:textSize="11sp"
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"

View file

@ -33,8 +33,9 @@
android:layout_height="match_parent"
app:srcCompat="@drawable/ic_chevron_left_black_24dp" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/date"
style="@style/GrayButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
@ -52,8 +53,9 @@
android:layout_height="match_parent"
app:srcCompat="@drawable/ic_last_page_black_24dp" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/zoom"
style="@style/GrayButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"

View file

@ -62,21 +62,21 @@
android:layout_gravity="center_vertical"
android:paddingBottom="8dp">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/reset"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginEnd="8dp"
style="@style/mdtp_ActionButton.Text"
style="@style/OkCancelButton"
android:text="@string/resettodefaults" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
style="@style/mdtp_ActionButton.Text"
android:text="@string/mdtp_ok" />
style="@style/OkCancelButton"
android:text="@string/ok" />
</LinearLayout>

View file

@ -21,7 +21,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
app:tabIndicatorColor="#FFFFFF"
app:tabIndicatorColor="@color/tabSelectedTextColor"
app:tabTextColor="@color/tabTextColor"
app:tabSelectedTextColor="@color/tabSelectedTextColor"
app:tabMode="scrollable" />
<com.google.android.material.tabs.TabLayout
@ -31,8 +33,11 @@
android:background="@android:color/transparent"
app:tabMinWidth="0dp"
app:tabPadding="0dp"
app:tabIndicatorColor="#FFFFFF"
app:tabIndicatorColor="@color/tabSelectedTextColor"
app:tabTextColor="@color/tabTextColor"
app:tabSelectedTextColor="@color/tabSelectedTextColor"
app:tabMode="scrollable" />
</androidx.appcompat.widget.Toolbar>
<androidx.drawerlayout.widget.DrawerLayout

View file

@ -78,21 +78,21 @@
android:layout_gravity="center_vertical"
android:paddingBottom="8dp">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/reset"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginEnd="8dp"
style="@style/mdtp_ActionButton.Text"
style="@style/OkCancelButton"
android:text="@string/reset" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
style="@style/mdtp_ActionButton.Text"
android:text="@string/mdtp_ok" />
style="@style/OkCancelButton"
android:text="@string/ok" />
</LinearLayout>

View file

@ -14,6 +14,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
style="@style/mdtp_ActionButton.Text"
style="@style/OkCancelButton.Text"
android:text="@string/close" />
</LinearLayout>

View file

@ -5,11 +5,12 @@
android:gravity="center"
android:orientation="vertical">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/unlock"
style="@style/GrayButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:layout_gravity="center"
android:text="@string/unlock_settings" />
<androidx.core.widget.NestedScrollView

View file

@ -21,17 +21,17 @@
android:layout_marginEnd="8dp"
android:stretchColumns="2" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/summary_details_btn"
style="?android:attr/buttonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="bottom"
android:gravity="center"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="3dp"
android:layout_marginBottom="10dp"
android:text="@string/check_preferences_details_btn"
android:textColor="@color/colorTreatmentButton"
android:visibility="gone" />

View file

@ -215,26 +215,33 @@
android:orientation="horizontal"
android:padding="5dp">
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/plus1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="+5" />
android:text="+5"
tools:ignore="HardcodedText" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/plus2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="+10" />
android:text="+10"
tools:ignore="HardcodedText" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/plus3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="+20" />
android:text="+20"
tools:ignore="HardcodedText" />
</LinearLayout>

View file

@ -105,22 +105,25 @@
android:layout_height="wrap_content"
android:padding="5dp">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/fill_preset_button1"
style="@style/GrayButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="0.3U" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/fill_preset_button2"
style="@style/GrayButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="0.7U" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/fill_preset_button3"
style="@style/GrayButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"

View file

@ -146,22 +146,25 @@
android:orientation="horizontal"
android:padding="5dp">
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/plus05"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:contentDescription="Increment insuline with 0.5"
android:contentDescription="Increment insulin with 0.5"
android:text="+0.5" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/plus10"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="+1.0" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/plus20"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -395,14 +395,14 @@
android:layout_marginBottom="5dp"
android:background="@color/list_delimiter" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/cancel"
style="@style/mdtp_ActionButton.Text"
style="@style/OkCancelButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:text="@string/mdtp_cancel"
android:text="@string/cancel"
android:padding="10dp"
android:textAlignment="textEnd" />

View file

@ -256,11 +256,12 @@
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:scaleX="1.4"
android:scaleY="1.4"
android:button="@drawable/checkbox_bg_icon"
android:button="@android:color/transparent"
android:checked="true"
android:contentDescription="@string/treatments_wizard_bg_label" />
android:contentDescription="@string/treatments_wizard_bg_label"
android:drawableStart="@drawable/checkbox_bg_icon"
android:scaleX="1.4"
android:scaleY="1.4" />
<CheckBox
android:id="@+id/tt_checkbox_icon"
@ -268,12 +269,13 @@
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:button="@android:color/transparent"
android:checked="true"
android:contentDescription="@string/treatments_wizard_tt_label"
android:drawableStart="@drawable/checkbox_tt_icon"
android:scaleX="1.6"
android:scaleY="1.6"
android:button="@drawable/checkbox_tt_icon"
android:checked="true"
android:visibility="gone"
android:contentDescription="@string/treatments_wizard_tt_label" />
android:visibility="gone" />
<CheckBox
android:id="@+id/trend_checkbox_icon"
@ -281,11 +283,12 @@
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:scaleX="1.4"
android:scaleY="1.4"
android:button="@drawable/checkbox_trend_icon"
android:button="@android:color/transparent"
android:checked="true"
android:contentDescription="@string/bg_trend_label" />
android:contentDescription="@string/bg_trend_label"
android:drawableStart="@drawable/checkbox_trend_icon"
android:scaleX="1.4"
android:scaleY="1.4" />
<CheckBox
android:id="@+id/iob_checkbox_icon"
@ -293,11 +296,12 @@
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:scaleX="1.4"
android:scaleY="1.4"
android:button="@drawable/checkbox_iob_icon"
android:button="@android:color/transparent"
android:checked="true"
android:contentDescription="@string/iob" />
android:contentDescription="@string/iob"
android:drawableStart="@drawable/checkbox_iob_icon"
android:scaleX="1.4"
android:scaleY="1.4" />
<CheckBox
android:id="@+id/cob_checkbox_icon"
@ -305,11 +309,12 @@
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:scaleX="1.6"
android:scaleY="1.6"
android:button="@drawable/checkbox_cob_icon"
android:button="@android:color/transparent"
android:checked="true"
android:contentDescription="@string/treatments_wizard_cob_label" />
android:contentDescription="@string/treatments_wizard_cob_label"
android:drawableStart="@drawable/checkbox_cob_icon"
android:scaleX="1.6"
android:scaleY="1.6" />
</LinearLayout>

View file

@ -488,13 +488,13 @@
android:layout_gravity="center_vertical"
android:paddingBottom="8dp">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
style="@style/mdtp_ActionButton.Text"
android:text="@string/mdtp_ok" />
style="@style/OkCancelButton"
android:text="@string/ok" />
</LinearLayout>
</LinearLayout>

View file

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
card_view:cardBackgroundColor="?android:colorBackground">
card_view:cardBackgroundColor="@color/cardColorBackground">
<LinearLayout
android:id="@+id/food_item"

View file

@ -1,6 +1,7 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".plugins.profile.local.LocalProfileFragment">
@ -10,38 +11,25 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:labelFor="@+id/spinner"
android:text="@string/selected_profile"
android:textAppearance="?android:attr/textAppearanceMedium" />
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
android:hint="@string/select_profile"
android:textColorHint="@color/white"
app:boxStrokeColor="@color/list_delimiter">
<Spinner
android:id="@+id/spinner"
android:layout_width="0dp"
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
android:id="@+id/profileList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:layout_weight="1" />
android:clickable="true"
android:enabled="false"
tools:ignore="KeyboardInaccessibleWidget" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="@color/list_delimiter" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
@ -320,21 +308,20 @@
</LinearLayout>
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/profileswitch"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="1"
android:drawableStart="@drawable/ic_local_activate"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/activate_profile" />
android:text="@string/activate_profile"
app:icon="@drawable/ic_local_activate"
app:iconTint="@color/ic_local_activate" />
<LinearLayout
android:layout_width="match_parent"
@ -342,37 +329,35 @@
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/reset"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:drawableStart="@drawable/ic_local_reset"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/reset" />
android:paddingLeft="1dp"
android:paddingRight="1dp"
android:text="@string/reset"
app:icon="@drawable/ic_local_reset"
app:iconTint="@color/ic_local_reset" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/save"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:drawableStart="@drawable/ic_local_save"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/save" />
android:paddingLeft="1dp"
android:paddingRight="1dp"
android:text="@string/save"
app:icon="@drawable/ic_local_save"
app:iconTint="@color/ic_local_save" />
</LinearLayout>
</LinearLayout>

View file

@ -10,9 +10,9 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/run"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/openapsma_run" />

View file

@ -10,94 +10,94 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/nav_logsettings"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="0.5"
android:text="@string/nav_logsettings"
android:textColor="@color/colorTreatmentButton" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/log_send"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="0.5"
android:text="@string/send_all_logs"
android:textColor="@color/colorTreatmentButton" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/log_delete"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="0.5"
android:text="@string/delete_logs"
android:textColor="@color/colorTreatmentButton" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/nav_export"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="0.5"
android:text="@string/nav_export"
android:textColor="@color/colorTreatmentButton" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/nav_import"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="0.5"
android:text="@string/nav_import"
android:textColor="@color/colorTreatmentButton" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/export_csv"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="0.5"
android:text="@string/ue_export_to_csv"
android:textColor="@color/colorTreatmentButton" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/nav_resetdb"
style="?android:attr/buttonStyle"
style="@style/GrayButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="0.5"
android:text="@string/nav_resetdb"
android:textColor="@color/colorTreatmentButton" />

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="60dp"
android:layout_height="100dp"
android:background="@drawable/background_darkgray"
@ -13,7 +14,8 @@
android:padding="0dp"
android:text="+"
android:textColor="@color/mdtp_white"
android:textSize="25sp" />
android:textSize="25sp"
tools:ignore="HardcodedText" />
<EditText
android:id="@+id/display"
@ -24,7 +26,8 @@
android:imeOptions="actionDone"
android:inputType="number"
android:text="1"
android:textColor="@android:color/black" />
android:textColor="@android:color/black"
tools:ignore="HardcodedText" />
<Button
android:id="@+id/decrement"
@ -32,8 +35,9 @@
android:layout_height="30dp"
android:background="@null"
android:padding="0dp"
android:text=""
android:text="-"
android:textColor="@color/mdtp_white"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>

View file

@ -42,9 +42,9 @@
android:padding="4dp"
app:layout_constraintTop_toBottomOf="@+id/exam_disabledto">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/exam_reset"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reset" />
@ -55,16 +55,16 @@
android:layout_weight="1"
android:text="" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/close"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/close" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/exam_verify"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/objectives_button_verify" />
@ -122,9 +122,9 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/buttons">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/back_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/previous_button" />
@ -135,16 +135,16 @@
android:layout_weight="1"
android:text="" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/next_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/next_button" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/next_unanswered_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/unfinshed_button" />

View file

@ -23,9 +23,9 @@
android:layout_weight="1"
android:text="Enable fake time and progress" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/reset"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reset" />

View file

@ -8,7 +8,7 @@
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
app:cardBackgroundColor="@color/colorPrimary"
app:cardBackgroundColor="@color/cardColorBackground"
app:cardCornerRadius="2dp"
app:cardUseCompatPadding="true"
app:contentPadding="16dp">
@ -53,32 +53,36 @@
</LinearLayout>
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/verify"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/objectives_button_verify" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/start"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/objectives_button_start" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/unfinish"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/objectives_button_unfinish" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/unstart"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/objectives_button_unstart" />
<TextView
@ -107,9 +111,9 @@
android:hint="XXXXXXXXXX"
android:inputType="text" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/enterbutton"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/objectives_button_enter" />

View file

@ -18,7 +18,7 @@
android:layout_height="56dp"
android:orientation="horizontal"
android:background="@android:color/transparent"
android:gravity="end|right"
android:gravity="end"
android:layout_gravity="center_vertical"
android:paddingBottom="8dp">
@ -26,18 +26,15 @@
android:id="@+id/cancel"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
style="@style/mdtp_ActionButton.Text"
android:text="@string/mdtp_cancel" />
style="@style/OkCancelButton.Text"
android:text="@string/cancel" />
<Button
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
style="@style/mdtp_ActionButton.Text"
android:text="@string/mdtp_ok" />
style="@style/OkCancelButton.Text"
android:text="@string/ok" />
</LinearLayout>
<!-- From: file:/Users/wdullaer/Documents/Programming%20Projects/MaterialDateTimePicker/library/src/main/res/layout/mdtp_done_button.xml -->

View file

@ -15,9 +15,9 @@
android:layout_height="match_parent"
android:orientation="horizontal">
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/run"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/openapsma_run" />

View file

@ -26,7 +26,8 @@
android:text="Notification text. Notification text. Notification text. Notification text. Notification text. Notification text. "
tools:ignore="HardcodedText" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/dismiss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -10,16 +10,9 @@
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".plugins.general.overview.activities.QuickWizardListActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="15dp"
android:text="@string/quickwizard"
android:textAlignment="center"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/add_button"
style="@style/GrayButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/overview_editquickwizardlistactivity_add" />

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/overview_quickwizard_cardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -49,21 +50,23 @@
android:id="@+id/overview_quickwizard_item_buttonText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingStart="10dp"
android:text="Sample button text"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/cardObjectiveText"
android:textStyle="normal|bold" />
android:textStyle="normal|bold"
tools:ignore="HardcodedText,RtlSymmetry" />
<TextView
android:id="@+id/overview_quickwizard_item_carbs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingStart="10dp"
android:text="36g"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/cardObjectiveText"
android:textStyle="normal|bold" />
android:textStyle="normal|bold"
tools:ignore="HardcodedText,RtlSymmetry" />
</LinearLayout>
@ -73,16 +76,15 @@
android:layout_height="wrap_content"
android:adjustViewBounds="false"
android:cropToPadding="false"
android:paddingRight="10dp"
android:paddingEnd="10dp"
android:scaleType="fitStart"
card_view:srcCompat="@drawable/ic_smartphone" />
card_view:srcCompat="@drawable/ic_smartphone"
tools:ignore="RtlSymmetry" />
<ImageView
android:id="@+id/handleView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:adjustViewBounds="false"
android:cropToPadding="false"
android:scaleType="fitStart"
@ -99,8 +101,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingLeft="10dp"
android:paddingRight="5dp"
android:paddingStart="10dp"
android:paddingEnd="5dp"
android:text="@string/overview_editquickwizard_valid"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
@ -109,25 +111,28 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="10dp"
android:paddingEnd="10dp"
android:text="07:45"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="normal|bold" />
android:textStyle="normal|bold"
tools:ignore="HardcodedText,RtlSymmetry" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
android:text="-"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/overview_quickwizard_item_to"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingStart="10dp"
android:text="11:45"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="normal|bold" />
android:textStyle="normal|bold"
tools:ignore="HardcodedText,RtlSymmetry" />
</LinearLayout>
@ -140,19 +145,22 @@
android:layout_height="match_parent"
android:orientation="horizontal">
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/overview_quickwizard_item_edit_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/overview_quickwizard_item_edit_button" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/overview_quickwizard_item_remove_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/remove_button" />
</LinearLayout>
</LinearLayout>

View file

@ -14,7 +14,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -23,7 +24,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/status" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/uploadnow"
android:layout_width="113dp"
android:layout_height="50dp"
@ -32,7 +34,8 @@
app:layout_constraintStart_toEndOf="@+id/login"
app:layout_constraintTop_toBottomOf="@+id/status" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/removeall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -42,7 +45,8 @@
app:layout_constraintStart_toEndOf="@+id/uploadnow"
app:layout_constraintTop_toBottomOf="@+id/status" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/resertstart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
card_view:cardBackgroundColor="?android:colorBackground">
card_view:cardBackgroundColor="@color/cardColorBackground">
<LinearLayout
android:layout_width="match_parent"

View file

@ -10,9 +10,9 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/resend"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
@ -23,9 +23,9 @@
android:text="@string/resend_all_data"
android:textColor="@color/colorTreatmentButton" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/opensettings"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"

View file

@ -50,6 +50,6 @@
<color name="deviationred">#72FF0000</color>
<color name="deviationblack">#72000000</color>
<color name="splashBackground">#2E2E2E</color>
<color name="splashBackground">#000000</color>
</resources>

View file

@ -530,8 +530,6 @@
<string name="keep_screen_on_summary">Prevent Android to turn screen off. It will consume lot of energy when not plugged to power outlet.</string>
<string name="sensitivity_warning">By turning on Autosense feature remember to enter all eated carbs. Otherwise carbs deviations will be identified wrong as sensitivity change !!</string>
<string name="sensitivityweightedaverage">Sensitivity WeightedAverage</string>
<string name="mdtp_ok">OK</string>
<string name="mdtp_cancel">Cancel</string>
<string name="notloadedplugins">Not all profiles loaded!</string>
<string name="valuesnotstored">Values not stored!</string>
<string name="ns_localbroadcasts">Enable broadcasts to other apps (like xDrip+). Do not enable if you have more than one instance of AAPS or NSClient installed!</string>
@ -1208,4 +1206,5 @@
<string name="wear_unknown_action_string">Unknown action command:</string>
<string name="overview_editquickwizard_percentage">Percentage</string>
<string name="app_default">Application default</string>
<string name="select_profile">Select profile to edit</string>
</resources>

View file

@ -1,21 +1,12 @@
<resources>
<!-- The launcher theme. It sets the main window background to the launch_screen drawable -->
<style name="AppTheme.Launcher" parent="Theme.AppCompat.NoActionBar">
<style name="AppTheme.Launcher" parent="Theme.MaterialComponents.NoActionBar">
<item name="android:windowBackground">@drawable/launch_screen</item>
<!-- Optional, on Android 5+ you can modify the colorPrimaryDark color to match the windowBackground color for further branding-->
<!-- <item name="colorPrimaryDark">@android:color/white</item> -->
</style>
<style name="AppTheme" parent="Theme.AppCompat">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="dialogTitleBackground">@color/dialog_title_background</item>
<item name="dialogTitleColor">@color/dialog_title_color</item>
<item name="dialogTitleIconTint">@color/dialog_title_icon_tint</item>
</style>
<style name="section_header_label">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
@ -36,5 +27,4 @@
<item name="android:textColor">#ff0000</item>
</style>
<style name="ProfileHelperAppTheme" parent="Theme.MaterialComponents.NoActionBar"/>
</resources>

View file

@ -36,7 +36,7 @@ class InputDateTime(private val rh: ResourceHelper, private val dateUtil: DateUt
val cal = Calendar.getInstance()
cal.timeInMillis = value
DatePickerDialog(
it,
it, R.style.MaterialPickerTheme,
{ _, year, monthOfYear, dayOfMonth ->
value = Calendar.getInstance().apply {
timeInMillis = value
@ -62,7 +62,7 @@ class InputDateTime(private val rh: ResourceHelper, private val dateUtil: DateUt
val cal = Calendar.getInstance()
cal.timeInMillis = value
TimePickerDialog(
it,
it, R.style.MaterialPickerTheme,
{ _, hour, minute ->
value = Calendar.getInstance().apply {
timeInMillis = value

View file

@ -38,7 +38,7 @@ class InputTime(private val rh: ResourceHelper, private val dateUtil: DateUtil)
val cal = Calendar.getInstance()
cal.timeInMillis = toMills(value)
TimePickerDialog(
it,
it, R.style.MaterialPickerTheme,
{ _, hour, minute ->
value = 60 * hour + minute
text = dateUtil.timeString(toMills(value))

View file

@ -42,7 +42,7 @@ class InputTimeRange(private val rh: ResourceHelper, private val dateUtil: DateU
val cal = Calendar.getInstance()
cal.timeInMillis = toMills(start)
TimePickerDialog(
it,
it, R.style.MaterialPickerTheme,
{ _, hour, minute ->
start = 60 * hour + minute
text = dateUtil.timeString(toMills(start))
@ -63,7 +63,7 @@ class InputTimeRange(private val rh: ResourceHelper, private val dateUtil: DateU
val cal = Calendar.getInstance()
cal.timeInMillis = toMills(end)
TimePickerDialog(
it,
it, R.style.MaterialPickerTheme,
{ _, hour, minute ->
end = 60 * hour + minute
text = dateUtil.timeString(toMills(end))

View file

@ -13,10 +13,10 @@
<activity android:name="info.nightscout.androidaps.activities.TDDStatsActivity" />
<activity
android:name="info.nightscout.androidaps.activities.BolusProgressHelperActivity"
android:theme="@style/Theme.AppCompat.Translucent" />
android:theme="@style/Theme.MaterialComponents.Translucent" />
<activity
android:name="info.nightscout.androidaps.activities.ErrorHelperActivity"
android:theme="@style/Theme.AppCompat.Translucent" />
android:theme="@style/Theme.MaterialComponents.Translucent" />
</application>
</manifest>

View file

@ -104,7 +104,8 @@ abstract class DialogFragmentWithDate : DaggerDialogFragment() {
val cal = Calendar.getInstance()
cal.timeInMillis = eventTime
DatePickerDialog(
it, dateSetListener,
it, R.style.MaterialPickerTheme,
dateSetListener,
cal.get(Calendar.YEAR),
cal.get(Calendar.MONTH),
cal.get(Calendar.DAY_OF_MONTH)
@ -132,7 +133,8 @@ abstract class DialogFragmentWithDate : DaggerDialogFragment() {
val cal = Calendar.getInstance()
cal.timeInMillis = eventTime
TimePickerDialog(
it, timeSetListener,
it, R.style.MaterialPickerTheme,
timeSetListener,
cal.get(Calendar.HOUR_OF_DAY),
cal.get(Calendar.MINUTE),
DateFormat.is24HourFormat(context)

View file

@ -17,7 +17,7 @@ object OKDialog {
var notEmptyTitle = title
if (notEmptyTitle.isEmpty()) notEmptyTitle = context.getString(R.string.message)
AlertDialogHelper.Builder(context)
AlertDialogHelper.Builder(context, R.style.DialogTheme)
.setCustomTitle(AlertDialogHelper.buildCustomTitle(context, notEmptyTitle))
.setMessage(message)
.setPositiveButton(context.getString(R.string.ok)) { dialog: DialogInterface, _: Int ->
@ -39,7 +39,7 @@ object OKDialog {
var notEmptyTitle = title
if (notEmptyTitle.isEmpty()) notEmptyTitle = activity.getString(R.string.message)
AlertDialogHelper.Builder(activity)
AlertDialogHelper.Builder(activity, R.style.DialogTheme)
.setCustomTitle(AlertDialogHelper.buildCustomTitle(activity, notEmptyTitle))
.setMessage(message)
.setPositiveButton(activity.getString(R.string.ok)) { dialog: DialogInterface, _: Int ->
@ -66,7 +66,7 @@ object OKDialog {
@SuppressLint("InflateParams")
fun showConfirmation(activity: FragmentActivity, title: String, message: Spanned, ok: Runnable?, cancel: Runnable? = null) {
var okClicked = false
AlertDialogHelper.Builder(activity)
AlertDialogHelper.Builder(activity, R.style.DialogTheme)
.setMessage(message)
.setCustomTitle(AlertDialogHelper.buildCustomTitle(activity, title))
.setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _: Int ->
@ -94,7 +94,7 @@ object OKDialog {
@SuppressLint("InflateParams")
fun showConfirmation(activity: FragmentActivity, title: String, message: String, ok: Runnable?, cancel: Runnable? = null) {
var okClicked = false
AlertDialogHelper.Builder(activity)
AlertDialogHelper.Builder(activity, R.style.DialogTheme)
.setMessage(message)
.setCustomTitle(AlertDialogHelper.buildCustomTitle(activity, title))
.setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _: Int ->
@ -126,7 +126,7 @@ object OKDialog {
@SuppressLint("InflateParams")
fun showConfirmation(context: Context, title: String, message: Spanned, ok: Runnable?, cancel: Runnable? = null) {
var okClicked = false
AlertDialogHelper.Builder(context)
AlertDialogHelper.Builder(context, R.style.DialogTheme)
.setMessage(message)
.setCustomTitle(AlertDialogHelper.buildCustomTitle(context, title))
.setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _: Int ->
@ -158,7 +158,7 @@ object OKDialog {
@SuppressLint("InflateParams")
fun showConfirmation(context: Context, title: String, message: String, ok: Runnable?, cancel: Runnable? = null) {
var okClicked = false
AlertDialogHelper.Builder(context)
AlertDialogHelper.Builder(context, R.style.DialogTheme)
.setMessage(message)
.setCustomTitle(AlertDialogHelper.buildCustomTitle(context, title))
.setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _: Int ->
@ -186,7 +186,7 @@ object OKDialog {
@SuppressLint("InflateParams")
fun showConfirmation(context: Context, title: String, message: String, ok: DialogInterface.OnClickListener?, cancel: DialogInterface.OnClickListener? = null) {
var okClicked = false
AlertDialogHelper.Builder(context)
AlertDialogHelper.Builder(context, R.style.DialogTheme)
.setMessage(message)
.setCustomTitle(AlertDialogHelper.buildCustomTitle(context, title))
.setPositiveButton(android.R.string.ok) { dialog: DialogInterface, which: Int ->
@ -214,7 +214,7 @@ object OKDialog {
@SuppressLint("InflateParams")
fun showYesNoCancel(context: Context, title: String, message: String, yes: Runnable?, no: Runnable? = null) {
var okClicked = false
AlertDialogHelper.Builder(context)
AlertDialogHelper.Builder(context, R.style.DialogTheme)
.setMessage(message)
.setCustomTitle(AlertDialogHelper.buildCustomTitle(context, title))
.setPositiveButton(R.string.yes) { dialog: DialogInterface, _: Int ->

View file

@ -41,7 +41,7 @@ class PasswordCheck @Inject constructor(
}
val promptsView = LayoutInflater.from(context).inflate(R.layout.passwordprompt, null)
val alertDialogBuilder = AlertDialogHelper.Builder(context)
val alertDialogBuilder = AlertDialogHelper.Builder(context, R.style.DialogTheme)
alertDialogBuilder.setView(promptsView)
val userInput = promptsView.findViewById<View>(R.id.password_prompt_pass) as EditText
@ -76,7 +76,7 @@ class PasswordCheck @Inject constructor(
@SuppressLint("InflateParams")
fun setPassword(context: Context, @StringRes labelId: Int, @StringRes preference: Int, ok: ((String) -> Unit)? = null, cancel: (() -> Unit)? = null, clear: (() -> Unit)? = null) {
val promptsView = LayoutInflater.from(context).inflate(R.layout.passwordprompt, null)
val alertDialogBuilder = AlertDialogHelper.Builder(context)
val alertDialogBuilder = AlertDialogHelper.Builder(context, R.style.DialogTheme)
alertDialogBuilder.setView(promptsView)
val userInput = promptsView.findViewById<View>(R.id.password_prompt_pass) as EditText
@ -130,7 +130,7 @@ class PasswordCheck @Inject constructor(
@StringRes passwordWarning: Int?, ok: ((String) -> Unit)?, cancel: (() -> Unit)? = null) {
val promptsView = LayoutInflater.from(context).inflate(R.layout.passwordprompt, null)
val alertDialogBuilder = AlertDialogHelper.Builder(context)
val alertDialogBuilder = AlertDialogHelper.Builder(context, R.style.DialogTheme)
alertDialogBuilder.setView(promptsView)
passwordExplanation?.let { alertDialogBuilder.setMessage(it) }

View file

@ -7,36 +7,36 @@
android:pathData="M18.693,9.268c-1.078,-2.638 -3.669,-4.497 -6.695,-4.497c-3.993,0 -7.229,3.237 -7.229,7.229"
android:strokeWidth="1.2756"
android:fillColor="#00000000"
android:strokeColor="#E93057"
android:strokeColor="@color/ic_actions_refill"
android:strokeLineCap="round"/>
<path
android:pathData="M18.693,9.268L18.937,4.778"
android:strokeWidth="1.2756"
android:fillColor="#00000000"
android:strokeColor="#E93057"
android:strokeColor="@color/ic_actions_refill"
android:strokeLineCap="round"/>
<path
android:pathData="M18.693,9.268L14.54,7.538"
android:strokeWidth="1.2756"
android:fillColor="#00000000"
android:strokeColor="#E93057"
android:strokeColor="@color/ic_actions_refill"
android:strokeLineCap="round"/>
<path
android:pathData="M5.307,14.733c1.078,2.638 3.669,4.497 6.695,4.497c3.993,0 7.229,-3.237 7.229,-7.229"
android:strokeWidth="1.2756"
android:fillColor="#00000000"
android:strokeColor="#E93057"
android:strokeColor="@color/ic_actions_refill"
android:strokeLineCap="round"/>
<path
android:pathData="M5.307,14.733L5.063,19.223"
android:strokeWidth="1.2756"
android:fillColor="#00000000"
android:strokeColor="#E93057"
android:strokeColor="@color/ic_actions_refill"
android:strokeLineCap="round"/>
<path
android:pathData="M5.307,14.733L9.46,16.463"
android:strokeWidth="1.2756"
android:fillColor="#00000000"
android:strokeColor="#E93057"
android:strokeColor="@color/ic_actions_refill"
android:strokeLineCap="round"/>
</vector>

View file

@ -5,8 +5,8 @@
android:viewportHeight="24">
<path
android:pathData="M16.763,17.562c0,0.424 -0.341,0.769 -0.761,0.769H6.883c-0.42,0 -0.762,-0.345 -0.762,-0.769V8.397c0,-0.424 0.342,-0.769 0.762,-0.769h7.342l0.959,-1.417H6.883c-1.202,0 -2.179,0.98 -2.179,2.186v9.165c0,1.205 0.977,2.187 2.179,2.187h9.119c1.201,0 2.179,-0.981 2.179,-2.187V9.266l-1.418,2.096V17.562z"
android:fillColor="#67E86A"/>
android:fillColor="@color/ic_local_save"/>
<path
android:pathData="M18.824,4.573c-0.326,-0.221 -0.766,-0.135 -0.984,0.19l-5.944,8.787l-2.518,-2.53c-0.277,-0.277 -0.726,-0.279 -1.002,-0.002c-0.277,0.276 -0.278,0.725 -0.002,1.002l3.125,3.141c0.134,0.134 0.315,0.209 0.502,0.209c0.022,0 0.044,-0.001 0.066,-0.004c0.211,-0.02 0.402,-0.133 0.521,-0.308l6.427,-9.501C19.233,5.232 19.148,4.792 18.824,4.573z"
android:fillColor="#67E86A"/>
android:fillColor="@color/ic_local_save"/>
</vector>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_shortAnimTime">
<item android:drawable="@drawable/mdtp_material_button_selected" android:state_focused="true" />
<item android:drawable="@drawable/mdtp_material_button_selected" android:state_pressed="true" />
<item android:drawable="@drawable/material_button_selected" android:state_focused="true" />
<item android:drawable="@drawable/material_button_selected" android:state_pressed="true" />
<item android:drawable="@android:color/transparent" />
</selector>

View file

@ -5,7 +5,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="2dp" />
<solid android:color="@color/mdtp_button_selected" />
<solid android:color="@color/okButtonSelected" />
<padding
android:bottom="4dp"
android:top="4dp" />

View file

@ -14,6 +14,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
style="@style/mdtp_ActionButton.Text"
style="@style/OkCancelButton.Text"
android:text="@string/close" />
</LinearLayout>

View file

@ -73,7 +73,8 @@
android:maxHeight="5dp"
android:minHeight="3dp" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/stop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -50,7 +50,8 @@
android:paddingRight="10dp"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/mute_5min"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -60,7 +61,8 @@
android:layout_marginRight="30dp"
android:text="@string/mute5min" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/mute"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -70,7 +72,8 @@
android:layout_marginRight="30dp"
android:text="@string/mute" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/ok"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="130dp"
android:layout_height="40dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
@ -15,7 +16,8 @@
android:background="@android:color/transparent"
app:backgroundTint="@android:color/transparent"
android:textStyle="bold"
android:text="—"/>
android:text="-"
tools:ignore="HardcodedText" />
<EditText
android:id="@+id/display"
@ -27,7 +29,7 @@
android:inputType="number"
android:gravity="center"
android:imeOptions="actionDone"
/>
tools:ignore="HardcodedText" />
<Button
android:id="@+id/increment"
android:layout_width="30dp"
@ -38,5 +40,6 @@
android:background="@android:color/transparent"
app:backgroundTint="@android:color/transparent"
android:text="+"/>
android:text="+"
tools:ignore="HardcodedText" />
</LinearLayout>

View file

@ -28,7 +28,7 @@
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginEnd="8dp"
style="@style/mdtp_ActionButton.Text"
style="@style/OkCancelButton.Text"
android:text="@string/cancel" />
<Button
@ -36,7 +36,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
style="@style/mdtp_ActionButton.Text"
style="@style/OkCancelButton.Text"
android:text="@string/ok" />
</LinearLayout>
<!-- From: file:/Users/wdullaer/Documents/Programming%20Projects/MaterialDateTimePicker/library/src/main/res/layout/mdtp_done_button.xml -->

View file

@ -1,19 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Default theme color -->
<!-- This section describes the main theme colors -->
<color name="colorPrimary">#212121</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorAccent">#40bbaa</color>
<color name="mdtp_button_selected">#33969696</color>
<color name="mdtp_button_color">@color/colorAccent</color>
<color name="mdtp_white">#ffffff</color>
<color name="mdtp_line_dark">#808080</color>
<color name="colorLightGray">#d8d8d8</color>
<color name="cardColorBackground">#121212</color>
<color name="cardColorBackground">#212121</color>
<color name="black_overlay">#66000000</color>
<color name="gray">#BBBBBB</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="primaryColorDefault">#222222</color>
<color name="primaryLightColorDefault">#bbb9bb</color>
<color name="primaryDarkColorDefault">#222222</color>
<color name="secondaryColorDefault">#03dac6</color>
<color name="secondaryLightColorDefault">#e3e3e3</color>
<color name="secondaryDarkColorDefault">#848484</color>
<color name="primaryTextColorDefault">#ffffff</color>
<color name="secondaryTextColorDefault">#000000</color>
<color name="overviewPillColorDefault">#1c171c</color>
<color name="colorOnPrimaryDefault">#FFFFFF</color>
<color name="defaultbackground">#424242</color>
<color name="defaulttextcolor">#B3FFFFFF</color>
<!-- Tabs-->
<color name="tabTextColor">#d0d0d0</color>
<color name="tabSelectedTextColor">@color/white</color>
<!-- Buttons-->
<color name="buttonBackground">#555555</color>
<color name="buttonText">#ffffff</color>
<color name="okButtonText">@color/colorAccent</color>
<color name="okButtonSelected">#33969696</color>
<color name="ic_actions_refill">#E93057</color>
<color name="ic_local_activate">#67DFE8</color>
<color name="ic_local_reset">#E93057</color>
<color name="ic_local_save">#67E86A</color>
<!-- Fragments-->
<color name="pumpStatusBackground">#505050</color>
@ -27,6 +57,7 @@
<color name="warningAccentText">#FFFB8C00</color>
<color name="errorAlertBackground">#FFFF5555</color>
<color name="errorAlertHeaderText">#FF000000</color>
<color name="helperProfile">#C803A9F4</color>
<color name="examinedProfile">#FFFF5555</color>
<color name="defaulttext">#BBBBBB</color>
@ -54,7 +85,6 @@
<color name="carbs">#FFFB8C00</color>
<color name="uam">#c9bd60</color>
<color name="zt">#00d2d2</color>
<color name="white">#ffffff</color>
<color name="calibration">#E83258</color>
<color name="ribbonDefault">#5a595b</color>

View file

@ -1,8 +0,0 @@
<resources>
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>

View file

@ -1,16 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns2="http://schemas.android.com/tools">
<style name="AppTheme" parent="Theme.AppCompat">
<style name="AppTheme" parent="Theme.MaterialComponents">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorAccent">@color/secondaryColorDefault</item>
<item name="dialogTitleBackground">@color/dialog_title_background</item>
<item name="dialogTitleColor">@color/dialog_title_color</item>
<item name="dialogTitleIconTint">@color/dialog_title_icon_tint</item>
<!-- New MaterialComponents attributes. -->
<item name="colorSecondary">@color/secondaryColorDefault</item>
<item name="colorPrimaryVariant">@color/primaryLightColorDefault</item>
<item name="colorSecondaryVariant">@color/secondaryLightColorDefault</item>
<item name="colorOnPrimary">@color/primaryTextColorDefault</item>
<item name="colorSurface">@color/black_alpha_90</item>
<item name="colorOnSurface">@color/gray</item>
<item name="colorOnSecondary">@color/white</item>
<item name="colorOnBackground">@color/white</item>
<item name="colorOnError">@color/black</item>
<item name="scrimBackground">@color/mtrl_scrim_color</item>
<item name="android:textColorSecondary">@color/white</item>
<item name="android:textColorPrimary">@color/white</item>
<item name="android:textColor">@color/white</item>
</style>
<style name="Theme.AppCompat.Translucent" parent="Theme.AppCompat.NoActionBar">
<style name="AppTheme.NoActionBar" parent="Theme.MaterialComponents.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<!-- BolusProgress, Error -->
<style name="Theme.MaterialComponents.Translucent" parent="Theme.MaterialComponents.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
@ -18,73 +39,97 @@
<item name="android:windowAnimationStyle">@android:style/Animation</item>
</style>
<style name="Theme.AppCompat.NoTitle" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">false</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<!-- Buttons from MaterialDateTimePicker, Dialogs ... -->
<dimen name="material_button_height">48dp</dimen>
<dimen name="material_button_text_size">14sp</dimen>
<dimen name="material_button_min_width">64dp</dimen>
<dimen name="material_button_text_padding_horizontal">8dp</dimen>
<style name="OkCancelButton">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">@dimen/material_button_height</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:focusable">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="OkCancelButton.Text" ns2:ignore="NewApi">
<item name="android:textSize">@dimen/material_button_text_size</item>
<item name="android:singleLine">true</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:gravity">center</item>
<item name="android:stateListAnimator">@null</item>
<item name="android:background">@drawable/material_button_background</item>
<item name="android:minWidth">@dimen/material_button_min_width</item>
<item name="android:paddingLeft">@dimen/material_button_text_padding_horizontal</item>
<item name="android:paddingRight">@dimen/material_button_text_padding_horizontal</item>
<item name="android:textColor">@color/okButtonText</item>
<item name="android:textAllCaps">true</item>
</style>
<style name="AppThemeWarningDialog" parent="AppTheme">
<style name="MaterialPickerTheme" parent="android:Theme.Material.Dialog.Alert">
<item name="buttonBarPositiveButtonStyle">@style/PickerTextButton</item>
<item name="buttonBarNegativeButtonStyle">@style/PickerTextButton</item>
</style>
<style name="PickerTextButton" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/okButtonText</item>
</style>
<!-- Common Buttons -->
<dimen name="gray_material_button_margin_horizontal">5dp</dimen>
<style name="GrayButton" parent="Widget.MaterialComponents.Button">
<item name="android:backgroundTint">@color/buttonBackground</item>
<item name="android:textColor">@color/buttonText</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:gravity">center</item>
<item name="android:layout_marginStart">@dimen/gray_material_button_margin_horizontal</item>
<item name="android:layout_marginEnd">@dimen/gray_material_button_margin_horizontal</item>
<item name="android:textAllCaps">true</item>
</style>
<style name="ButtonSmallFontStyle" parent="GrayButton">
<item name="android:textSize">10sp</item>
</style>
<style name="ButtonMediumFontStyle" parent="GrayButton">
<item name="android:textSize">15sp</item>
</style>
<!-- Alert Dialogs -->
<style name="DialogTheme" parent="ThemeOverlay.MaterialComponents.Dialog.Alert">
<item name="buttonBarNegativeButtonStyle">@style/DialogOkCancelButtonStyle</item>
<item name="buttonBarPositiveButtonStyle">@style/DialogOkCancelButtonStyle</item>
<item name="buttonBarNeutralButtonStyle">@style/DialogOkCancelButtonStyle</item>
</style>
<style name="DialogOkCancelButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/okButtonText</item>
</style>
<style name="AppThemeWarningDialog" parent="DialogTheme">
<item name="alertDialogTheme">@style/AppThemeWarningDialogTheme</item>
<item name="dialogTitleBackground">@color/warningAlertBackground</item>
<item name="dialogTitleColor">@color/warningAlertHeaderText</item>
<item name="dialogTitleIconTint">@color/warningAlertHeaderText</item>
</style>
<style name="AppThemeWarningDialogTheme" parent="Theme.AppCompat.Dialog.MinWidth">
<style name="AppThemeWarningDialogTheme" parent="Theme.MaterialComponents.Dialog.MinWidth">
<item name="android:windowBackground">@drawable/alert_border_warning</item>
<item name="colorAccent">@color/warningAlertBackground</item>
</style>
<style name="AppThemeErrorDialog" parent="AppTheme">
<style name="AppThemeErrorDialog" parent="DialogTheme">
<item name="alertDialogTheme">@style/AppThemeErrorDialogTheme</item>
<item name="dialogTitleBackground">@color/errorAlertBackground</item>
<item name="dialogTitleColor">@color/errorAlertHeaderText</item>
<item name="dialogTitleIconTint">@color/errorAlertHeaderText</item>
</style>
<style name="AppThemeErrorDialogTheme" parent="Theme.AppCompat.Dialog.MinWidth">
<style name="AppThemeErrorDialogTheme" parent="Theme.MaterialComponents.Dialog.MinWidth">
<item name="android:windowBackground">@drawable/alert_border_error</item>
<item name="colorAccent">@color/errorAlertBackground</item>
</style>
<style name="ButtonSmallFontStyle">
<item name="android:textSize">10sp</item>
</style>
<style name="ButtonMediumFontStyle">
<item name="android:textSize">15sp</item>
</style>
<!-- Buttons from MaterialDateTimePicker -->
<dimen name="mdtp_material_button_height">48dp</dimen>
<dimen name="mdtp_material_button_textsize">14sp</dimen>
<dimen name="mdtp_material_button_minwidth">64dp</dimen>
<dimen name="mdtp_material_button_textpadding_horizontal">8dp</dimen>
<style name="mdtp_ActionButton">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">@dimen/mdtp_material_button_height</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:focusable">true</item>
</style>
<style name="mdtp_ActionButton.Text" ns2:ignore="NewApi">
<item name="android:textSize">@dimen/mdtp_material_button_textsize</item>
<item name="android:singleLine">true</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:gravity">center</item>
<item name="android:stateListAnimator">@null</item>
<item name="android:background">@drawable/mdtp_material_button_background</item>
<item name="android:minWidth">@dimen/mdtp_material_button_minwidth</item>
<item name="android:paddingLeft">@dimen/mdtp_material_button_textpadding_horizontal</item>
<item name="android:paddingRight">@dimen/mdtp_material_button_textpadding_horizontal</item>
<item name="android:textColor">@color/mdtp_button_color</item>
<item name="android:textAllCaps">true</item>
</style>
</resources>

View file

@ -673,7 +673,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/view_profile"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -685,7 +685,7 @@
android:text="@string/viewprofile" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/history"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -697,7 +697,7 @@
android:text="@string/pumphistory"
tools:ignore="TooManyViews" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/stats"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -708,7 +708,7 @@
android:paddingRight="0dp"
android:text="@string/stats" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/user_options"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"

View file

@ -94,13 +94,14 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/status" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/reload"
style="@style/Widget.AppCompat.Button"
style="@style/GrayButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:drawableStart="@drawable/ic_actions_refill"
app:icon="@drawable/ic_actions_refill"
app:iconTint="@color/ic_actions_refill"
android:text="@string/reload"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -316,9 +316,9 @@
</LinearLayout>
<Button
<com.google.android.material.button.MaterialButton
style="@style/ButtonSmallFontStyle"
android:id="@+id/save_user_options"
style="@style/Widget.AppCompat.Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_local_save"

View file

@ -60,7 +60,8 @@
android:maxHeight="5dp"
android:minHeight="3dp" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/OkCancelButton"
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -1,4 +1,4 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -6,10 +6,6 @@
tools:context="info.nightscout.androidaps.diaconn.DiaconnG8Fragment">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -65,7 +61,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/serial_number"
@ -73,7 +70,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -100,7 +97,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/diaconn_g8_bluetooth_status"
android:textSize="14sp" />
@ -112,7 +109,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<com.joanzapata.iconify.widget.IconTextView
android:id="@+id/btconnection"
@ -120,10 +118,11 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:text="{fa-bluetooth-b}"
android:textColor="@android:color/white"
android:textSize="20dp" />
android:textSize="20dp"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -133,7 +132,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="content"
android:textAlignment="center" />
android:textAlignment="center"
tools:ignore="HardcodedText" />
<View
android:layout_width="fill_parent"
@ -155,7 +155,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/battery_label"
android:textSize="14sp" />
@ -167,7 +167,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<com.joanzapata.iconify.widget.IconTextView
android:id="@+id/battery"
@ -175,9 +176,9 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="20dp" />
android:textSize="20sp" />
</LinearLayout>
@ -202,7 +203,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/lastconnection_label"
android:textSize="14sp" />
@ -214,7 +215,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/lastconnection"
@ -222,7 +224,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -248,7 +250,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/lastbolus_label"
android:textSize="14sp" />
@ -260,7 +262,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/lastbolus"
@ -268,7 +271,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -294,7 +297,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/dailyunits"
android:textSize="14sp" />
@ -306,7 +309,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/dailyunits"
@ -314,7 +318,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -340,7 +344,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/basebasalrate_label"
android:textSize="14sp" />
@ -352,7 +356,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/basabasalrate"
@ -360,7 +365,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -386,7 +391,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/tempbasal_label"
android:textSize="14sp" />
@ -398,7 +403,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tempbasal"
@ -406,7 +412,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -432,7 +438,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/virtualpump_extendedbolus_label"
android:textSize="14sp" />
@ -444,7 +450,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/extendedbolus"
@ -452,7 +459,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -478,7 +485,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/reservoir_label"
android:textSize="14sp" />
@ -490,7 +497,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/reservoir"
@ -498,7 +506,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -524,7 +532,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/basal_step"
android:textSize="14sp" />
@ -536,7 +544,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/basalstep"
@ -544,7 +553,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -570,7 +579,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/bolus_step"
android:textSize="14sp" />
@ -582,7 +591,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/bolusstep"
@ -590,7 +600,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -616,7 +626,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/pump_firmware_label"
android:textSize="14sp" />
@ -628,7 +638,8 @@
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/firmware"
@ -636,7 +647,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -674,19 +685,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- <Button-->
<!-- android:id="@+id/viewprofile"-->
<!-- style="@style/ButtonSmallFontStyle"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_weight="1"-->
<!-- android:drawableTop="@drawable/ic_danarprofile"-->
<!-- android:paddingLeft="0dp"-->
<!-- android:paddingRight="0dp"-->
<!-- android:text="@string/viewprofile" />-->
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/history"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -697,7 +696,7 @@
android:paddingRight="0dp"
android:text="@string/pumphistory" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/stats"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -708,7 +707,7 @@
android:paddingRight="0dp"
android:text="@string/stats" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/user_options"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -723,6 +722,4 @@
</LinearLayout>
</RelativeLayout>
</FrameLayout>
</RelativeLayout>

View file

@ -82,13 +82,14 @@
android:layout_above="@id/reload"
android:layout_below="@+id/status" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/reload"
style="@style/Widget.AppCompat.Button"
style="@style/GrayButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:drawableStart="@drawable/ic_actions_refill"
android:text="@string/reload" />
android:text="@string/reload"
app:icon="@drawable/ic_actions_refill"
app:iconTint="@color/ic_actions_refill" />
</RelativeLayout>

View file

@ -101,7 +101,8 @@
android:layout_height="0dp"
android:layout_weight="1" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/save_alarm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -181,7 +182,8 @@
android:layout_height="0dp"
android:layout_weight="1" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/save_lcd_on_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -262,7 +264,8 @@
android:layout_height="0dp"
android:layout_weight="1" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/save_lang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -323,7 +326,8 @@
android:layout_height="0dp"
android:layout_weight="1" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/save_bolus_speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -5,6 +5,4 @@
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>

View file

@ -48,17 +48,17 @@
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/mute"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="muteClicked"
android:text="@string/mute_alert" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/confirm"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
style="@style/OkCancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="confirmClicked"

View file

@ -65,13 +65,15 @@
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
<com.google.android.material.button.MaterialButton
style="@style/OkCancelButton"
android:id="@+id/no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/no" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/OkCancelButton"
android:id="@+id/yes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -94,7 +96,8 @@
android:textSize="20sp"
android:text="@string/pairing_completed" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/OkCancelButton"
android:id="@+id/exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -158,7 +158,8 @@
android:layout_marginBottom="12dp"
android:textSize="14sp" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="deletePairing"

View file

@ -22,7 +22,8 @@
android:drawableTop="@drawable/ic_insight"
android:paddingTop="10dp" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/refresh"
android:layout_width="match_parent"
android:layout_height="100dp"
@ -30,14 +31,16 @@
android:text="@string/refresh"
android:visibility="gone" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/operating_mode"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="16dp"
android:visibility="gone" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/tbr_over_notification"
android:layout_width="match_parent"
android:layout_height="100dp"

View file

@ -59,9 +59,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/rileylink_status"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="5dp"
@ -71,7 +72,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<com.joanzapata.iconify.widget.IconTextView
android:id="@+id/rl_status"
@ -79,10 +81,11 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:text="{fa-bluetooth-b}"
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText,RtlSymmetry" />
</LinearLayout>
@ -111,9 +114,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/rl_battery_label"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:id="@+id/rl_battery_semicolon"
@ -124,7 +128,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<com.joanzapata.iconify.widget.IconTextView
android:id="@+id/rl_battery_state"
@ -132,10 +137,11 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:text=""
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
@ -161,9 +167,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/medtronic_pump_status"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="5dp"
@ -173,7 +180,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<com.joanzapata.iconify.widget.IconTextView
android:id="@+id/pump_status_icon"
@ -181,10 +189,11 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:text="{fa-bluetooth-b}"
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText,RtlSymmetry" />
</LinearLayout>
@ -194,7 +203,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="content"
android:textAlignment="center" />
android:textAlignment="center"
tools:ignore="HardcodedText" />
<View
android:layout_width="fill_parent"
@ -215,9 +225,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/battery_label"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="5dp"
@ -227,7 +238,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<com.joanzapata.iconify.widget.IconTextView
android:id="@+id/pump_state_battery"
@ -235,10 +247,11 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:text=""
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
@ -263,9 +276,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/lastconnection_label"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="5dp"
@ -275,7 +289,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/last_connection"
@ -283,9 +298,10 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
@ -309,9 +325,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/lastbolus_label"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="5dp"
@ -321,7 +338,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/last_bolus"
@ -329,9 +347,10 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
@ -356,9 +375,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/basebasalrate_label"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="5dp"
@ -368,7 +388,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/base_basal_rate"
@ -376,9 +397,10 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
@ -402,9 +424,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/tempbasal_label"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="5dp"
@ -414,7 +437,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/temp_basal"
@ -422,9 +446,10 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
@ -449,9 +474,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/reservoir_label"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="5dp"
@ -461,7 +487,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/reservoir"
@ -469,9 +496,10 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
@ -496,9 +524,10 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingEnd="5dp"
android:text="@string/medtronic_errors"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="5dp"
@ -508,7 +537,8 @@
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text=":"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/errors"
@ -516,9 +546,10 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
@ -549,7 +580,7 @@
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/refresh"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -561,7 +592,7 @@
android:text="@string/refresh" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/history"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -572,7 +603,7 @@
android:paddingRight="0dp"
android:text="@string/pumphistory" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/stats"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"

View file

@ -95,7 +95,7 @@
android:enabled="true"
android:key="@string/key_rileylink_mac_address"
android:summary=""
android:title="RileyLink Configuration">
android:title="@string/rileylink_configuration">
<intent android:action="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEConfigActivity" />
</Preference>
<SwitchPreference

View file

@ -37,7 +37,7 @@ class AttachPodFragment : InfoFragmentBase() {
view.findViewById<Button>(R.id.button_next).setOnClickListener {
context?.let {
AlertDialog.Builder(it)
AlertDialog.Builder(it, R.style.DialogTheme)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(getString(getTitleId()))
.setMessage(getString(R.string.omnipod_common_pod_activation_wizard_attach_pod_confirm_insert_cannula_text))

View file

@ -14,7 +14,7 @@ abstract class OmnipodWizardActivityBase : NoSplashAppCompatActivity() {
if (getNavController().previousBackStackEntry == null) {
finish()
} else {
AlertDialog.Builder(this)
AlertDialog.Builder(this, R.style.DialogTheme)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(getString(R.string.omnipod_common_wizard_exit_confirmation_title))
.setMessage(getString(R.string.omnipod_common_wizard_exit_confirmation_text))

View file

@ -34,7 +34,7 @@ class DeactivatePodFragment : ActionFragmentBase() {
buttonDiscardPod = view.findViewById(R.id.omnipod_wizard_button_discard_pod)
buttonDiscardPod.setOnClickListener {
context?.let {
AlertDialog.Builder(it)
AlertDialog.Builder(it, R.style.DialogTheme)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(getString(R.string.omnipod_common_pod_deactivation_wizard_discard_pod))
.setMessage(getString(R.string.omnipod_common_pod_deactivation_wizard_discard_pod_confirmation))

View file

@ -2,7 +2,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/button_refresh_status"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -12,7 +12,7 @@
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/refresh" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/button_pod_management"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -22,7 +22,7 @@
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_common_overview_button_pod_management" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/button_silence_alerts"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -32,7 +32,7 @@
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_common_overview_button_silence_alerts" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/button_set_time"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -43,7 +43,7 @@
android:text="@string/omnipod_common_overview_button_set_time"
android:visibility="gone" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/button_resume_delivery"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
@ -54,7 +54,7 @@
android:text="@string/omnipod_common_overview_button_resume_delivery"
android:visibility="gone" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/button_suspend_delivery"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"

View file

@ -51,7 +51,8 @@
android:orientation="horizontal"
android:paddingEnd="50dp">
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/omnipod_wizard_button_deactivate_pod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -59,7 +60,8 @@
android:text="@string/omnipod_common_wizard_button_deactivate_pod"
android:visibility="gone" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/omnipod_wizard_button_discard_pod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -67,7 +69,8 @@
android:text="@string/omnipod_common_wizard_button_discard_pod"
android:visibility="gone" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/omnipod_wizard_button_retry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -4,14 +4,16 @@
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/button_cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/omnipod_common_wizard_button_cancel" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/button_next"
android:layout_width="0dp"
android:layout_height="wrap_content"

View file

@ -27,7 +27,6 @@
<string name="omnipod_eros_overview_firmware_version_value" translatable="false">PM %1$s / PI %2$s</string>
<!-- Omnipod Eros - Preferences -->
<string name="omnipod_eros_preferences_riley_link_configuration">RileyLink Configuration</string>
<string name="omnipod_eros_preferences_category_notifications">Notifications</string>
<string name="omnipod_eros_preferences_pulse_log_button_enabled">Show Pulse Log button in Pod Management menu</string>
<string name="omnipod_eros_preferences_riley_link_stats_button_enabled">Show RileyLink Stats button in Pod Management menu</string>

View file

@ -11,7 +11,7 @@
<Preference
android:enabled="true"
android:key="@string/key_rileylink_mac_address"
android:title="@string/omnipod_eros_preferences_riley_link_configuration">
android:title="@string/rileylink_configuration">
<intent android:action="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEConfigActivity" />
</Preference>

View file

@ -13,7 +13,9 @@
<uses-permission android:name="android.permission.LOCAL_MAC_ADDRESS" />
<application>
<activity android:name="info.nightscout.androidaps.plugins.pump.common.dialog.RileyLinkBLEConfigActivity">
<activity android:name="info.nightscout.androidaps.plugins.pump.common.dialog.RileyLinkBLEConfigActivity"
android:theme="@style/AppTheme"
android:exported="false">
<intent-filter>
<action android:name="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEConfigActivity" />
<category android:name="android.intent.category.DEFAULT" />
@ -22,8 +24,7 @@
<activity
android:name="info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusActivity"
android:label="@string/title_activity_rileylink_settings"
android:theme="@style/Theme.AppCompat.NoTitle" />
android:label="@string/title_activity_rileylink_settings" />
</application>
</manifest>

View file

@ -1,7 +1,6 @@
package info.nightscout.androidaps.plugins.pump.common.dialog
import android.annotation.SuppressLint
import android.app.AlertDialog
import android.bluetooth.BluetoothAdapter
import android.bluetooth.BluetoothDevice
import android.bluetooth.BluetoothManager
@ -11,16 +10,19 @@ import android.bluetooth.le.ScanFilter
import android.bluetooth.le.ScanResult
import android.bluetooth.le.ScanSettings
import android.content.Context
import android.content.DialogInterface
import android.os.Bundle
import android.os.Handler
import android.os.HandlerThread
import android.os.ParcelUuid
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import android.widget.*
import android.widget.AdapterView
import android.widget.AdapterView.OnItemClickListener
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
import android.widget.BaseAdapter
import android.widget.TextView
import android.widget.Toast
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.R
@ -29,6 +31,9 @@ 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.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.androidaps.utils.resources.ResourceHelper
import info.nightscout.shared.logging.AAPSLogger
import info.nightscout.shared.logging.LTag
import info.nightscout.shared.sharedPreferences.SP
import org.apache.commons.lang3.StringUtils
@ -36,13 +41,15 @@ import java.util.*
import javax.inject.Inject
// IMPORTANT: This activity needs to be called from RileyLinkSelectPreference (see pref_medtronic.xml as example)
class RileyLinkBLEConfigActivity : NoSplashAppCompatActivity() {
class RileyLinkBLEConfigActivity : DaggerAppCompatActivity() {
@Inject lateinit var sp: SP
@Inject lateinit var blePreCheck: BlePreCheck
@Inject lateinit var rileyLinkUtil: RileyLinkUtil
@Inject lateinit var activePlugin: ActivePlugin
@Inject lateinit var context: Context
@Inject lateinit var rh: ResourceHelper
@Inject lateinit var aapsLogger: AAPSLogger
private val handler = Handler(HandlerThread(this::class.simpleName + "Handler").also { it.start() }.looper)
private val bluetoothAdapter: BluetoothAdapter? get() = (context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager?)?.adapter
@ -65,6 +72,10 @@ class RileyLinkBLEConfigActivity : NoSplashAppCompatActivity() {
binding = RileyLinkBleConfigActivityBinding.inflate(layoutInflater)
setContentView(binding.root)
title = rh.gs(R.string.rileylink_configuration)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setDisplayShowHomeEnabled(true)
// Initializes Bluetooth adapter.
binding.rileyLinkBleConfigScanDeviceList.adapter = deviceListAdapter
binding.rileyLinkBleConfigScanDeviceList.onItemClickListener = OnItemClickListener { _: AdapterView<*>?, view: View, _: Int, _: Long ->
@ -92,18 +103,16 @@ class RileyLinkBLEConfigActivity : NoSplashAppCompatActivity() {
}
}
binding.rileyLinkBleConfigButtonRemoveRileyLink.setOnClickListener {
AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(getString(R.string.riley_link_ble_config_remove_riley_link_confirmation_title))
.setMessage(getString(R.string.riley_link_ble_config_remove_riley_link_confirmation))
.setPositiveButton(getString(R.string.riley_link_common_yes)) { _: DialogInterface?, _: Int ->
OKDialog.showConfirmation(
this@RileyLinkBLEConfigActivity,
rh.gs(R.string.riley_link_ble_config_remove_riley_link_confirmation_title),
rh.gs(R.string.riley_link_ble_config_remove_riley_link_confirmation),
Runnable {
rileyLinkUtil.sendBroadcastMessage(RileyLinkConst.Intents.RileyLinkDisconnect, this@RileyLinkBLEConfigActivity)
sp.remove(RileyLinkConst.Prefs.RileyLinkAddress)
sp.remove(RileyLinkConst.Prefs.RileyLinkName)
updateCurrentlySelectedRileyLink()
}
.setNegativeButton(getString(R.string.riley_link_common_no), null)
.show()
})
}
}
@ -135,6 +144,17 @@ class RileyLinkBLEConfigActivity : NoSplashAppCompatActivity() {
}
}
override fun onOptionsItemSelected(item: MenuItem): Boolean =
when (item.itemId) {
android.R.id.home -> {
finish()
true
}
else -> false
}
private fun prepareForScanning() {
val checkOK = blePreCheck.prerequisitesCheck(this)
if (checkOK) {

View file

@ -37,7 +37,8 @@
android:textSize="12sp" />
</LinearLayout>
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/riley_link_ble_config_button_remove_riley_link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -58,13 +59,15 @@
android:layout_weight="1"
android:text="@string/riley_link_ble_config_scan_title" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/riley_link_ble_config_scan_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/riley_link_ble_config_button_scan_start" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/riley_link_ble_config_button_scan_stop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -6,16 +6,18 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusActivity">
tools:context="info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/appbar_padding_top"
android:theme="@style/AppTheme.AppBarOverlay">
android:paddingTop="@dimen/appbar_padding_top" >
<com.google.android.material.tabs.TabLayout
android:id="@+id/rileylink_settings_tabs"
app:tabIndicatorColor="@color/tabSelectedTextColor"
app:tabTextColor="@color/tabTextColor"
app:tabSelectedTextColor="@color/tabSelectedTextColor"
android:layout_width="match_parent"
android:layout_height="wrap_content">

View file

@ -13,7 +13,8 @@
android:text="Command"
android:textSize="12dp" />
<Button
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
android:id="@+id/rileylink_device_action"
android:layout_width="fill_parent"
android:layout_height="match_parent"

View file

@ -92,4 +92,5 @@
<string name="orange_use_scanning_level">Use Scanning</string>
<string name="orange_use_scanning_level_summary">Scan before connecting to OrangeLink, it should improve connections (can also be used with other RileyLink clones, if needed)</string>
<string name="key_orange_use_scanning" translatable="false">pref_orange_use_scanning</string>
<string name="rileylink_configuration">RileyLink Configuration</string>
</resources>