Merge branch 'dev' into wear
This commit is contained in:
commit
6076191515
338 changed files with 4296 additions and 4604 deletions
|
@ -5,6 +5,7 @@
|
|||
<w>abcdef</w>
|
||||
<w>acked</w>
|
||||
<w>actionstring</w>
|
||||
<w>aidex</w>
|
||||
<w>allowednumbers</w>
|
||||
<w>androidaps</w>
|
||||
<w>autosens</w>
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
<!-- To receive data from xdrip. -->
|
||||
<uses-permission android:name="com.eveningoutpost.dexdrip.permissions.RECEIVE_BG_ESTIMATE" />
|
||||
|
||||
<!-- To receive data from Aidex -->
|
||||
<uses-permission android:name="com.microtechmd.cgms.aidex.permissions.RECEIVE_BG_ESTIMATE" />
|
||||
|
||||
|
||||
<application
|
||||
android:name=".MainApp"
|
||||
android:allowBackup="true"
|
||||
|
@ -129,6 +133,8 @@
|
|||
<action android:name="com.china.poctech.data"/>
|
||||
<!-- Receiver from Tomato -->
|
||||
<action android:name="com.fanqies.tomatofn.BgEstimate"/>
|
||||
<!-- Receiver from GlucoRx Aidex -->
|
||||
<action android:name="com.microtechmd.cgms.aidex.action.BgEstimate"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package info.nightscout.androidaps.activities
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.DatePickerDialog
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.util.DisplayMetrics
|
||||
|
@ -9,6 +8,7 @@ import android.view.ViewGroup
|
|||
import android.widget.LinearLayout
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import com.google.android.material.datepicker.MaterialDatePicker
|
||||
import com.jjoe64.graphview.GraphView
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.R
|
||||
|
@ -148,33 +148,19 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
|
|||
true
|
||||
}
|
||||
|
||||
// create an OnDateSetListener
|
||||
val dateSetListener = DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
|
||||
Calendar.getInstance().also { calendar ->
|
||||
calendar.timeInMillis = overviewData.fromTime
|
||||
calendar[Calendar.YEAR] = year
|
||||
calendar[Calendar.MONTH] = monthOfYear
|
||||
calendar[Calendar.DAY_OF_MONTH] = dayOfMonth
|
||||
calendar[Calendar.MILLISECOND] = 0
|
||||
calendar[Calendar.SECOND] = 0
|
||||
calendar[Calendar.MINUTE] = 0
|
||||
calendar[Calendar.HOUR_OF_DAY] = 0
|
||||
setTime(calendar.timeInMillis)
|
||||
binding.date.setOnClickListener {
|
||||
MaterialDatePicker.Builder.datePicker()
|
||||
.setSelection(dateUtil.timeStampToUtcDateMilis(overviewData.fromTime))
|
||||
.setTheme(R.style.DatePicker)
|
||||
.build()
|
||||
.apply {
|
||||
addOnPositiveButtonClickListener { selection ->
|
||||
setTime(dateUtil.mergeUtcDateToTimestamp(overviewData.fromTime, selection))
|
||||
binding.date.text = dateUtil.dateAndTimeString(overviewData.fromTime)
|
||||
}
|
||||
loadAll("onClickDate")
|
||||
}
|
||||
|
||||
binding.date.setOnClickListener {
|
||||
val cal = Calendar.getInstance()
|
||||
cal.timeInMillis = overviewData.fromTime
|
||||
DatePickerDialog(
|
||||
this, R.style.MaterialPickerTheme,
|
||||
dateSetListener,
|
||||
cal.get(Calendar.YEAR),
|
||||
cal.get(Calendar.MONTH),
|
||||
cal.get(Calendar.DAY_OF_MONTH)
|
||||
).show()
|
||||
}
|
||||
.show(supportFragmentManager, "history_date_picker")
|
||||
}
|
||||
|
||||
val dm = DisplayMetrics()
|
||||
|
@ -184,9 +170,8 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
|
|||
else
|
||||
windowManager.defaultDisplay.getMetrics(dm)
|
||||
|
||||
|
||||
axisWidth = if (dm.densityDpi <= 120) 3 else if (dm.densityDpi <= 160) 10 else if (dm.densityDpi <= 320) 35 else if (dm.densityDpi <= 420) 50 else if (dm.densityDpi <= 560) 70 else 80
|
||||
binding.bgGraph.gridLabelRenderer?.gridColor = rh.gac(this, R.attr.graphgrid)
|
||||
binding.bgGraph.gridLabelRenderer?.gridColor = rh.gac(this, R.attr.graphGrid)
|
||||
binding.bgGraph.gridLabelRenderer?.reloadStyles()
|
||||
binding.bgGraph.gridLabelRenderer?.labelVerticalWidth = axisWidth
|
||||
|
||||
|
@ -259,12 +244,12 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
|
|||
|
||||
val graph = GraphView(this)
|
||||
graph.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, rh.dpToPx(100)).also { it.setMargins(0, rh.dpToPx(15), 0, rh.dpToPx(10)) }
|
||||
graph.gridLabelRenderer?.gridColor = rh.gac(R.attr.graphgrid)
|
||||
graph.gridLabelRenderer?.gridColor = rh.gac(R.attr.graphGrid)
|
||||
graph.gridLabelRenderer?.reloadStyles()
|
||||
graph.gridLabelRenderer?.isHorizontalLabelsVisible = false
|
||||
graph.gridLabelRenderer?.labelVerticalWidth = axisWidth
|
||||
graph.gridLabelRenderer?.numVerticalLabels = 3
|
||||
graph.viewport.backgroundColor = rh.gac(this, R.attr.viewPortbackgroundColor)
|
||||
graph.viewport.backgroundColor = rh.gac(this, R.attr.viewPortBackgroundColor)
|
||||
relativeLayout.addView(graph)
|
||||
|
||||
val label = TextView(this)
|
||||
|
|
|
@ -87,6 +87,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
@Inject lateinit var poctechPlugin: PoctechPlugin
|
||||
@Inject lateinit var tomatoPlugin: TomatoPlugin
|
||||
@Inject lateinit var glunovoPlugin: GlunovoPlugin
|
||||
@Inject lateinit var aidexPlugin: AidexPlugin
|
||||
@Inject lateinit var smsCommunicatorPlugin: SmsCommunicatorPlugin
|
||||
@Inject lateinit var statusLinePlugin: StatusLinePlugin
|
||||
@Inject lateinit var tidepoolPlugin: TidepoolPlugin
|
||||
|
@ -163,6 +164,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
addPreferencesFromResourceIfEnabled(tomatoPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(glunovoPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(poctechPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(aidexPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(glimpPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(loopPlugin, rootKey, config.APS)
|
||||
addPreferencesFromResourceIfEnabled(openAPSAMAPlugin, rootKey, config.APS)
|
||||
|
|
|
@ -241,10 +241,10 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() {
|
|||
}
|
||||
ToastUtils.showToastInUiThread(this, R.string.invalidinput)
|
||||
}
|
||||
binding.age.editText?.id?.let { binding.ageLabel.labelFor = it }
|
||||
binding.tdd.editText?.id?.let { binding.tddLabel.labelFor = it }
|
||||
binding.weight.editText?.id?.let { binding.weightLabel.labelFor = it }
|
||||
binding.basalPctFromTdd.editText?.id?.let { binding.basalPctFromTddLabel.labelFor = it }
|
||||
binding.ageLabel.labelFor = binding.age.editTextId
|
||||
binding.tddLabel.labelFor = binding.tdd.editTextId
|
||||
binding.weightLabel.labelFor = binding.weight.editTextId
|
||||
binding.basalPctFromTddLabel.labelFor = binding.basalPctFromTdd.editTextId
|
||||
|
||||
switchTab(0, typeSelected[0], false)
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun setBackgroundColorOnSelected(tab: Int) {
|
||||
binding.menu1.setBackgroundColor(rh.gac(this, if (tab == 1) R.attr.defaultbackground else R.attr.helperProfileColor))
|
||||
binding.menu2.setBackgroundColor(rh.gac(this, if (tab == 0) R.attr.defaultbackground else R.attr.examinedProfileColor))
|
||||
binding.menu1.setBackgroundColor(rh.gac(this, if (tab == 1) R.attr.defaultBackground else R.attr.helperProfileColor))
|
||||
binding.menu2.setBackgroundColor(rh.gac(this, if (tab == 0) R.attr.defaultBackground else R.attr.examinedProfileColor))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -269,8 +269,6 @@ class TreatmentsBolusCarbsFragment : DaggerFragment() {
|
|||
}
|
||||
|
||||
holder.binding.calculation.tag = ml
|
||||
val nextTimestamp = if (mealLinks.size != position + 1) timestamp(mealLinks[position + 1]) else 0L
|
||||
holder.binding.delimiter.visibility = dateUtil.isSameDayGroup(timestamp(ml), nextTimestamp).toVisibility()
|
||||
}
|
||||
|
||||
override fun getItemCount() = mealLinks.size
|
||||
|
|
|
@ -173,8 +173,6 @@ class TreatmentsCareportalFragment : DaggerFragment() {
|
|||
actionHelper.updateSelection(position, therapyEvent, holder.binding.cbRemove.isChecked)
|
||||
}
|
||||
holder.binding.cbRemove.isChecked = actionHelper.isSelected(position)
|
||||
val nextTimestamp = if (therapyList.size != position + 1) therapyList[position + 1].timestamp else 0L
|
||||
holder.binding.delimiter.visibility = dateUtil.isSameDayGroup(therapyEvent.timestamp, nextTimestamp).toVisibility()
|
||||
}
|
||||
|
||||
override fun getItemCount() = therapyList.size
|
||||
|
|
|
@ -163,8 +163,6 @@ class TreatmentsExtendedBolusesFragment : DaggerFragment() {
|
|||
}
|
||||
holder.binding.cbRemove.isChecked = actionHelper.isSelected(position)
|
||||
}
|
||||
val nextTimestamp = if (extendedBolusList.size != position + 1) extendedBolusList[position + 1].timestamp else 0L
|
||||
holder.binding.delimiter.visibility = dateUtil.isSameDayGroup(extendedBolus.timestamp, nextTimestamp).toVisibility()
|
||||
}
|
||||
|
||||
override fun getItemCount() = extendedBolusList.size
|
||||
|
|
|
@ -214,8 +214,6 @@ class TreatmentsProfileSwitchFragment : DaggerFragment() {
|
|||
}
|
||||
holder.binding.clone.visibility = (profileSwitch is ProfileSealed.PS).toVisibility()
|
||||
holder.binding.spacer.visibility = (profileSwitch is ProfileSealed.PS).toVisibility()
|
||||
val nextTimestamp = if (profileSwitchList.size != position + 1) profileSwitchList[position + 1].timestamp else 0L
|
||||
holder.binding.delimiter.visibility = dateUtil.isSameDayGroup(profileSwitch.timestamp, nextTimestamp).toVisibility()
|
||||
}
|
||||
|
||||
override fun getItemCount() = profileSwitchList.size
|
||||
|
|
|
@ -192,8 +192,6 @@ class TreatmentsTempTargetFragment : DaggerFragment() {
|
|||
else -> holder.binding.reasonColon.currentTextColor
|
||||
}
|
||||
)
|
||||
val nextTimestamp = if (tempTargetList.size != position + 1) tempTargetList[position + 1].timestamp else 0L
|
||||
holder.binding.delimiter.visibility = dateUtil.isSameDayGroup(tempTarget.timestamp, nextTimestamp).toVisibility()
|
||||
}
|
||||
|
||||
override fun getItemCount() = tempTargetList.size
|
||||
|
|
|
@ -204,8 +204,6 @@ class TreatmentsTemporaryBasalsFragment : DaggerFragment() {
|
|||
}
|
||||
holder.binding.cbRemove.isChecked = actionHelper.isSelected(position)
|
||||
}
|
||||
val nextTimestamp = if (tempBasalList.size != position + 1) tempBasalList[position + 1].timestamp else 0L
|
||||
holder.binding.delimiter.visibility = dateUtil.isSameDayGroup(tempBasal.timestamp, nextTimestamp).toVisibility()
|
||||
}
|
||||
|
||||
override fun getItemCount() = tempBasalList.size
|
||||
|
|
|
@ -134,8 +134,6 @@ class TreatmentsUserEntryFragment : DaggerFragment() {
|
|||
holder.binding.iconSource.setImageResource(userEntryPresentationHelper.iconId(current.source))
|
||||
holder.binding.values.text = userEntryPresentationHelper.listToPresentationString(current.values)
|
||||
holder.binding.values.visibility = (holder.binding.values.text != "").toVisibility()
|
||||
val nextTimestamp = if (entries.size != position + 1) entries[position + 1].timestamp else 0L
|
||||
holder.binding.delimiter.visibility = dateUtil.isSameDayGroup(current.timestamp, nextTimestamp).toVisibility()
|
||||
}
|
||||
|
||||
inner class UserEntryViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
|
|
|
@ -358,6 +358,12 @@ abstract class PluginsModule {
|
|||
@IntKey(460)
|
||||
abstract fun bindTomatoPlugin(plugin: TomatoPlugin): PluginBase
|
||||
|
||||
@Binds
|
||||
@AllConfigs
|
||||
@IntoMap
|
||||
@IntKey(465)
|
||||
abstract fun bindAidexPlugin(plugin: AidexPlugin): PluginBase
|
||||
|
||||
@Binds
|
||||
@AllConfigs
|
||||
@IntoMap
|
||||
|
|
|
@ -32,4 +32,5 @@ abstract class WorkersModule {
|
|||
@ContributesAndroidInjector abstract fun contributesNSClientMbgWorker(): NSClientMbgWorker
|
||||
@ContributesAndroidInjector abstract fun contributesFoodWorker(): FoodPlugin.FoodWorker
|
||||
@ContributesAndroidInjector abstract fun contributesCsvExportWorker(): ImportExportPrefsImpl.CsvExportWorker
|
||||
@ContributesAndroidInjector abstract fun contributesAidexWorker(): AidexPlugin.AidexWorker
|
||||
}
|
|
@ -64,7 +64,7 @@ class CalibrationDialog : DialogFragmentWithDate() {
|
|||
binding.bg.setParams(savedInstanceState?.getDouble("bg")
|
||||
?: bg, 36.0, 500.0, 1.0, DecimalFormat("0"), false, binding.okcancel.ok)
|
||||
binding.units.text = if (units == GlucoseUnit.MMOL) rh.gs(R.string.mmol) else rh.gs(R.string.mgdl)
|
||||
binding.bg.editText?.id?.let { binding.bgLabel.labelFor = it }
|
||||
binding.bgLabel.labelFor = binding.bg.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -199,9 +199,9 @@ class CarbsDialog : DialogFragmentWithDate() {
|
|||
binding.hypoTt.isChecked = false
|
||||
binding.activityTt.isChecked = false
|
||||
}
|
||||
binding.duration.editText?.id?.let { binding.durationLabel.labelFor = it }
|
||||
binding.time.editText?.id?.let { binding.timeLabel.labelFor = it }
|
||||
binding.carbs.editText?.id?.let { binding.carbsLabel.labelFor = it }
|
||||
binding.durationLabel.labelFor = binding.duration.editTextId
|
||||
binding.timeLabel.labelFor = binding.time.editTextId
|
||||
binding.carbsLabel.labelFor = binding.carbs.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -165,8 +165,8 @@ class CareDialog : DialogFragmentWithDate() {
|
|||
?: 0.0, 0.0, Constants.MAX_PROFILE_SWITCH_DURATION, 10.0, DecimalFormat("0"), false, binding.okcancel.ok)
|
||||
if (options == EventType.NOTE || options == EventType.QUESTION || options == EventType.ANNOUNCEMENT || options == EventType.EXERCISE)
|
||||
binding.notesLayout.root.visibility = View.VISIBLE // independent to preferences
|
||||
binding.bg.editText?.id?.let { binding.bgLabel.labelFor = it }
|
||||
binding.duration.editText?.id?.let { binding.durationLabel.labelFor = it }
|
||||
binding.bgLabel.labelFor = binding.bg.editTextId
|
||||
binding.durationLabel.labelFor = binding.duration.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -75,8 +75,8 @@ class ExtendedBolusDialog : DialogFragmentWithDate() {
|
|||
val extendedMaxDuration = pumpDescription.extendedBolusMaxDuration
|
||||
binding.duration.setParams(savedInstanceState?.getDouble("duration")
|
||||
?: extendedDurationStep, extendedDurationStep, extendedMaxDuration, extendedDurationStep, DecimalFormat("0"), false, binding.okcancel.ok)
|
||||
binding.insulin.editText?.id?.let { binding.insulinLabel.labelFor = it }
|
||||
binding.duration.editText?.id?.let { binding.durationLabel.labelFor = it }
|
||||
binding.insulinLabel.labelFor = binding.insulin.editTextId
|
||||
binding.durationLabel.labelFor = binding.duration.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -99,7 +99,7 @@ class FillDialog : DialogFragmentWithDate() {
|
|||
} else {
|
||||
binding.fillPresetButton3.visibility = View.GONE
|
||||
}
|
||||
binding.fillInsulinamount.editText?.id?.let { binding.fillLabel.labelFor = it }
|
||||
binding.fillLabel.labelFor = binding.fillInsulinamount.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -150,8 +150,8 @@ class InsulinDialog : DialogFragmentWithDate() {
|
|||
binding.recordOnly.setOnCheckedChangeListener { _, isChecked: Boolean ->
|
||||
binding.timeLayout.visibility = isChecked.toVisibility()
|
||||
}
|
||||
binding.amount.editText?.id?.let { binding.insulinLabel.labelFor = it }
|
||||
binding.time.editText?.id?.let { binding.timeLabel.labelFor = it }
|
||||
binding.insulinLabel.labelFor = binding.amount.editTextId
|
||||
binding.timeLabel.labelFor = binding.time.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -152,9 +152,9 @@ class ProfileSwitchDialog : DialogFragmentWithDate() {
|
|||
}
|
||||
}
|
||||
binding.ttLayout.visibility = View.GONE
|
||||
binding.duration.editText?.id?.let { binding.durationLabel.labelFor = it }
|
||||
binding.percentage.editText?.id?.let { binding.percentageLabel.labelFor = it }
|
||||
binding.timeshift.editText?.id?.let { binding.timeshiftLabel.labelFor = it }
|
||||
binding.durationLabel.labelFor = binding.duration.editTextId
|
||||
binding.percentageLabel.labelFor = binding.percentage.editTextId
|
||||
binding.timeshiftLabel.labelFor = binding.timeshift.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -89,9 +89,9 @@ class TempBasalDialog : DialogFragmentWithDate() {
|
|||
binding.percentLayout.visibility = View.GONE
|
||||
binding.absoluteLayout.visibility = View.VISIBLE
|
||||
}
|
||||
binding.basalPercentInput.editText?.id?.let { binding.basalPercentLabel.labelFor = it }
|
||||
binding.basalAbsoluteInput.editText?.id?.let { binding.basalAbsoluteLabel.labelFor = it }
|
||||
binding.duration.editText?.id?.let { binding.durationLabel.labelFor = it }
|
||||
binding.basalPercentLabel.labelFor = binding.basalPercentInput.editTextId
|
||||
binding.basalAbsoluteLabel.labelFor = binding.basalAbsoluteInput.editTextId
|
||||
binding.durationLabel.labelFor = binding.duration.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -123,8 +123,8 @@ class TempTargetDialog : DialogFragmentWithDate() {
|
|||
longClick(it)
|
||||
return@setOnLongClickListener true
|
||||
}
|
||||
binding.duration.editText?.id?.let { binding.durationLabel.labelFor = it }
|
||||
binding.temptarget.editText?.id?.let { binding.temptargetLabel.labelFor = it }
|
||||
binding.durationLabel.labelFor = binding.duration.editTextId
|
||||
binding.temptargetLabel.labelFor = binding.temptarget.editTextId
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -108,8 +108,8 @@ class TreatmentDialog : DialogFragmentWithDate() {
|
|||
binding.insulin.setParams(savedInstanceState?.getDouble("insulin")
|
||||
?: 0.0, 0.0, maxInsulin, pumpDescription.bolusStep, DecimalFormatter.pumpSupportedBolusFormat(activePlugin.activePump), false, binding.okcancel.ok, textWatcher)
|
||||
binding.recordOnlyLayout.visibility = View.GONE
|
||||
binding.insulin.editText?.id?.let { binding.insulinLabel.labelFor = it }
|
||||
binding.carbs.editText?.id?.let { binding.carbsLabel.labelFor = it }
|
||||
binding.insulinLabel.labelFor = binding.insulin.editTextId
|
||||
binding.carbsLabel.labelFor = binding.carbs.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -248,10 +248,10 @@ class WizardDialog : DaggerDialogFragment() {
|
|||
}
|
||||
|
||||
private fun setA11yLabels() {
|
||||
binding.bgInput.editText?.id?.let { binding.bgInputLabel.labelFor = it }
|
||||
binding.carbsInput.editText?.id?.let { binding.carbsInputLabel.labelFor = it }
|
||||
binding.correctionInput.editText?.id?.let { binding.correctionInputLabel.labelFor = it }
|
||||
binding.carbTimeInput.editText?.id?.let { binding.carbTimeInputLabel.labelFor = it }
|
||||
binding.bgInputLabel.labelFor = binding.bgInput.editTextId
|
||||
binding.carbsInputLabel.labelFor = binding.carbsInput.editTextId
|
||||
binding.correctionInputLabel.labelFor = binding.correctionInput.editTextId
|
||||
binding.carbTimeInputLabel.labelFor = binding.carbTimeInput.editTextId
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -130,7 +130,6 @@ class ProfileFunctionImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.constraints.objectives
|
||||
|
||||
import android.graphics.Color
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.HandlerThread
|
||||
|
@ -153,6 +153,7 @@ class ObjectivesFragment : DaggerFragment() {
|
|||
return ViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.objectives_item, parent, false))
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val objective = objectivesPlugin.objectives[position]
|
||||
holder.binding.title.text = rh.gs(R.string.nth_objective, position + 1)
|
||||
|
@ -167,7 +168,7 @@ class ObjectivesFragment : DaggerFragment() {
|
|||
} else
|
||||
holder.binding.gate.visibility = View.GONE
|
||||
if (!objective.isStarted) {
|
||||
holder.binding.gate.setTextColor(-0x1)
|
||||
holder.binding.gate.setTextColor(rh.gac(context, R.attr.defaultTextColor))
|
||||
holder.binding.verify.visibility = View.GONE
|
||||
holder.binding.progress.visibility = View.GONE
|
||||
holder.binding.accomplished.visibility = View.GONE
|
||||
|
@ -178,7 +179,7 @@ class ObjectivesFragment : DaggerFragment() {
|
|||
else
|
||||
holder.binding.start.visibility = View.GONE
|
||||
} else if (objective.isAccomplished) {
|
||||
holder.binding.gate.setTextColor(-0xb350b0)
|
||||
holder.binding.gate.setTextColor(rh.gac(context, R.attr.isAccomplishedColor))
|
||||
holder.binding.verify.visibility = View.GONE
|
||||
holder.binding.progress.visibility = View.GONE
|
||||
holder.binding.start.visibility = View.GONE
|
||||
|
@ -186,7 +187,7 @@ class ObjectivesFragment : DaggerFragment() {
|
|||
holder.binding.unfinish.visibility = View.VISIBLE
|
||||
holder.binding.unstart.visibility = View.GONE
|
||||
} else if (objective.isStarted) {
|
||||
holder.binding.gate.setTextColor(-0x1)
|
||||
holder.binding.gate.setTextColor(rh.gac(context,R.attr.defaultTextColor))
|
||||
holder.binding.verify.visibility = View.VISIBLE
|
||||
holder.binding.verify.isEnabled = objective.isCompleted || binding.fake.isChecked
|
||||
holder.binding.start.visibility = View.GONE
|
||||
|
@ -200,7 +201,7 @@ class ObjectivesFragment : DaggerFragment() {
|
|||
// name
|
||||
val name = TextView(holder.binding.progress.context)
|
||||
name.text = "${rh.gs(task.task)}:"
|
||||
name.setTextColor(-0x1)
|
||||
name.setTextColor(rh.gac(context,R.attr.defaultTextColor) )
|
||||
holder.binding.progress.addView(name, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)
|
||||
// hint
|
||||
task.hints.forEach { h ->
|
||||
|
@ -209,9 +210,9 @@ class ObjectivesFragment : DaggerFragment() {
|
|||
}
|
||||
// state
|
||||
val state = TextView(holder.binding.progress.context)
|
||||
state.setTextColor(-0x1)
|
||||
state.setTextColor(rh.gac(context,R.attr.defaultTextColor))
|
||||
val basicHTML = "<font color=\"%1\$s\"><b>%2\$s</b></font>"
|
||||
val formattedHTML = String.format(basicHTML, if (task.isCompleted()) "#4CAF50" else "#FF9800", task.progress)
|
||||
val formattedHTML = String.format(basicHTML, if (task.isCompleted()) rh.gac(context, R.attr.isCompletedColor) else rh.gac(context, R.attr.isNotCompletedColor), task.progress)
|
||||
state.text = HtmlHelper.fromHtml(formattedHTML)
|
||||
state.gravity = Gravity.END
|
||||
holder.binding.progress.addView(state, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)
|
||||
|
@ -228,7 +229,7 @@ class ObjectivesFragment : DaggerFragment() {
|
|||
}
|
||||
// horizontal line
|
||||
val separator = View(holder.binding.progress.context)
|
||||
separator.setBackgroundColor(Color.DKGRAY)
|
||||
separator.setBackgroundColor(rh.gac(context, R.attr.separatorColor))
|
||||
holder.binding.progress.addView(separator, LinearLayout.LayoutParams.MATCH_PARENT, 2)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ abstract class Objective(injector: HasAndroidInjector, spName: String, @StringRe
|
|||
textView.setText(hint)
|
||||
textView.autoLinkMask = Linkify.WEB_URLS
|
||||
textView.linksClickable = true
|
||||
textView.setLinkTextColor(Color.YELLOW)
|
||||
textView.setLinkTextColor(rh.gac(context, R.attr.colorSecondary))
|
||||
Linkify.addLinks(textView, Linkify.WEB_URLS)
|
||||
return textView
|
||||
}
|
||||
|
|
|
@ -80,7 +80,6 @@ class VersionCheckerPlugin @Inject constructor(
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
if (isOldVersion(gracePeriod.warning.daysToMillis()) && shouldWarnAgain()) {
|
||||
// store last notification time
|
||||
sp.putLong(R.string.key_last_versionchecker_plugin_warning, now)
|
||||
|
|
|
@ -4,8 +4,6 @@ import android.text.Spanned
|
|||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.interfaces.Config
|
||||
import info.nightscout.shared.logging.AAPSLogger
|
||||
import info.nightscout.shared.logging.LTag
|
||||
import info.nightscout.androidaps.plugins.aps.loop.APSResult
|
||||
import info.nightscout.androidaps.plugins.configBuilder.RunningConfiguration
|
||||
import info.nightscout.androidaps.utils.DateUtil
|
||||
|
@ -14,6 +12,8 @@ import info.nightscout.androidaps.utils.JsonHelper
|
|||
import info.nightscout.androidaps.utils.Round
|
||||
import info.nightscout.androidaps.utils.T
|
||||
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.json.JSONArray
|
||||
import org.json.JSONException
|
||||
|
@ -88,7 +88,7 @@ class NSDeviceStatus @Inject constructor(
|
|||
fun handleNewData(deviceStatuses: JSONArray) {
|
||||
aapsLogger.debug(LTag.NSCLIENT, "Got NS deviceStatus: \$deviceStatuses")
|
||||
try {
|
||||
for (i in deviceStatuses.length() -1 downTo 0) {
|
||||
for (i in deviceStatuses.length() - 1 downTo 0) {
|
||||
val devicestatusJson = deviceStatuses.getJSONObject(i)
|
||||
if (devicestatusJson != null) {
|
||||
setData(devicestatusJson)
|
||||
|
@ -157,7 +157,7 @@ class NSDeviceStatus @Inject constructor(
|
|||
|
||||
//String[] ALL_STATUS_FIELDS = {"reservoir", "battery", "clock", "status", "device"};
|
||||
val string = StringBuilder()
|
||||
.append("<span style=\"color:${rh.gcs(R.color.defaulttext)}\">")
|
||||
.append("<span style=\"color:${rh.gac(R.attr.nsTitleColor)}\">")
|
||||
.append(rh.gs(R.string.pump))
|
||||
.append(": </span>")
|
||||
|
||||
|
@ -248,7 +248,7 @@ class NSDeviceStatus @Inject constructor(
|
|||
val openApsStatus: Spanned
|
||||
get() {
|
||||
val string = StringBuilder()
|
||||
.append("<span style=\"color:${rh.gcs(R.color.defaulttext)}\">")
|
||||
.append("<span style=\"color:${rh.gac(R.attr.nsTitleColor)}\">")
|
||||
.append(rh.gs(R.string.openaps_short))
|
||||
.append(": </span>")
|
||||
|
||||
|
@ -268,8 +268,10 @@ class NSDeviceStatus @Inject constructor(
|
|||
get() {
|
||||
val string = StringBuilder()
|
||||
try {
|
||||
if (deviceStatusData.openAPSData.enacted != null && deviceStatusData.openAPSData.clockEnacted != deviceStatusData.openAPSData.clockSuggested) string.append("<b>").append(dateUtil.minAgo(rh, deviceStatusData.openAPSData.clockEnacted)).append("</b> ").append(deviceStatusData.openAPSData.enacted!!.getString("reason")).append("<br>")
|
||||
if (deviceStatusData.openAPSData.suggested != null) string.append("<b>").append(dateUtil.minAgo(rh, deviceStatusData.openAPSData.clockSuggested)).append("</b> ").append(deviceStatusData.openAPSData.suggested!!.getString("reason")).append("<br>")
|
||||
if (deviceStatusData.openAPSData.enacted != null && deviceStatusData.openAPSData.clockEnacted != deviceStatusData.openAPSData.clockSuggested) string.append("<b>")
|
||||
.append(dateUtil.minAgo(rh, deviceStatusData.openAPSData.clockEnacted)).append("</b> ").append(deviceStatusData.openAPSData.enacted!!.getString("reason")).append("<br>")
|
||||
if (deviceStatusData.openAPSData.suggested != null) string.append("<b>").append(dateUtil.minAgo(rh, deviceStatusData.openAPSData.clockSuggested)).append("</b> ")
|
||||
.append(deviceStatusData.openAPSData.suggested!!.getString("reason")).append("<br>")
|
||||
return fromHtml(string.toString())
|
||||
} catch (e: JSONException) {
|
||||
aapsLogger.error("Unhandled exception", e)
|
||||
|
@ -321,7 +323,7 @@ class NSDeviceStatus @Inject constructor(
|
|||
val uploaderStatusSpanned: Spanned
|
||||
get() {
|
||||
val string = StringBuilder()
|
||||
string.append("<span style=\"color:${rh.gcs(R.color.defaulttext)}\">")
|
||||
string.append("<span style=\"color:${rh.gac(R.attr.nsTitleColor)}\">")
|
||||
string.append(rh.gs(R.string.uploader_short))
|
||||
string.append(": </span>")
|
||||
val iterator: Iterator<*> = deviceStatusData.uploaderMap.entries.iterator()
|
||||
|
|
|
@ -183,7 +183,7 @@ class OverviewData @Inject constructor(
|
|||
} ?: R.drawable.ic_cp_basal_no_tbr
|
||||
|
||||
fun temporaryBasalColor(context: Context?, iobCobCalculator: IobCobCalculator): Int = iobCobCalculator.getTempBasalIncludingConvertedExtended(dateUtil.now())?.let { rh.gac(context , R.attr.basal) }
|
||||
?: rh.gac(context, R.attr.textAppearancemediumColor)
|
||||
?: rh.gac(context, R.attr.defaultTextColor)
|
||||
|
||||
/*
|
||||
* EXTENDED BOLUS
|
||||
|
|
|
@ -165,12 +165,12 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
val landscape = screenHeight < screenWidth
|
||||
|
||||
skinProvider.activeSkin().preProcessLandscapeOverviewLayout(dm, binding, landscape, rh.gb(R.bool.isTablet), smallHeight)
|
||||
binding.nsclientLayout.visibility = config.NSCLIENT.toVisibility()
|
||||
binding.nsclientCard.visibility = config.NSCLIENT.toVisibility()
|
||||
|
||||
binding.notifications.setHasFixedSize(false)
|
||||
binding.notifications.layoutManager = LinearLayoutManager(view.context)
|
||||
axisWidth = if (dm.densityDpi <= 120) 3 else if (dm.densityDpi <= 160) 10 else if (dm.densityDpi <= 320) 35 else if (dm.densityDpi <= 420) 50 else if (dm.densityDpi <= 560) 70 else 80
|
||||
binding.graphsLayout.bgGraph.gridLabelRenderer?.gridColor = rh.gac(context, R.attr.graphgrid)
|
||||
binding.graphsLayout.bgGraph.gridLabelRenderer?.gridColor = rh.gac(context, R.attr.graphGrid)
|
||||
binding.graphsLayout.bgGraph.gridLabelRenderer?.reloadStyles()
|
||||
binding.graphsLayout.bgGraph.gridLabelRenderer?.labelVerticalWidth = axisWidth
|
||||
binding.graphsLayout.bgGraph.layoutParams?.height = rh.dpToPx(skinProvider.activeSkin().mainGraphHeight)
|
||||
|
@ -179,7 +179,6 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
carbAnimation?.setEnterFadeDuration(1200)
|
||||
carbAnimation?.setExitFadeDuration(1200)
|
||||
|
||||
|
||||
binding.graphsLayout.bgGraph.setOnLongClickListener {
|
||||
overviewData.rangeToDisplay += 6
|
||||
overviewData.rangeToDisplay = if (overviewData.rangeToDisplay > 24) 6 else overviewData.rangeToDisplay
|
||||
|
@ -549,16 +548,16 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
binding.buttonsLayout.cgmButton.setCompoundDrawablesWithIntrinsicBounds(null, rh.gd(R.drawable.ic_byoda), null, null)
|
||||
for (drawable in binding.buttonsLayout.cgmButton.compoundDrawables) {
|
||||
drawable?.mutate()
|
||||
drawable?.colorFilter = PorterDuffColorFilter(rh.gac(context, R.attr.cgmdexColor), PorterDuff.Mode.SRC_IN)
|
||||
drawable?.colorFilter = PorterDuffColorFilter(rh.gac(context, R.attr.cgmDexColor), PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
binding.buttonsLayout.cgmButton.setTextColor(rh.gac(context, R.attr.cgmdexColor))
|
||||
binding.buttonsLayout.cgmButton.setTextColor(rh.gac(context, R.attr.cgmDexColor))
|
||||
} else if (xDripIsBgSource) {
|
||||
binding.buttonsLayout.cgmButton.setCompoundDrawablesWithIntrinsicBounds(null, rh.gd(R.drawable.ic_xdrip), null, null)
|
||||
for (drawable in binding.buttonsLayout.cgmButton.compoundDrawables) {
|
||||
drawable?.mutate()
|
||||
drawable?.colorFilter = PorterDuffColorFilter(rh.gac(context, R.attr.cgmxdripColor), PorterDuff.Mode.SRC_IN)
|
||||
drawable?.colorFilter = PorterDuffColorFilter(rh.gac(context, R.attr.cgmXdripColor), PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
binding.buttonsLayout.cgmButton.setTextColor(rh.gac(context, R.attr.cgmxdripColor))
|
||||
binding.buttonsLayout.cgmButton.setTextColor(rh.gac(context, R.attr.cgmXdripColor))
|
||||
}
|
||||
binding.buttonsLayout.cgmButton.visibility = (sp.getBoolean(R.string.key_show_cgm_button, false) && (xDripIsBgSource || dexcomIsSource)).toVisibility()
|
||||
|
||||
|
@ -714,12 +713,12 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
val graph = GraphView(context)
|
||||
graph.layoutParams =
|
||||
LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, rh.dpToPx(skinProvider.activeSkin().secondaryGraphHeight)).also { it.setMargins(0, rh.dpToPx(15), 0, rh.dpToPx(10)) }
|
||||
graph.gridLabelRenderer?.gridColor = rh.gac(context, R.attr.graphgrid)
|
||||
graph.gridLabelRenderer?.gridColor = rh.gac(context, R.attr.graphGrid)
|
||||
graph.gridLabelRenderer?.reloadStyles()
|
||||
graph.gridLabelRenderer?.isHorizontalLabelsVisible = false
|
||||
graph.gridLabelRenderer?.labelVerticalWidth = axisWidth
|
||||
graph.gridLabelRenderer?.numVerticalLabels = 3
|
||||
graph.viewport.backgroundColor = rh.gac(context, R.attr.viewPortbackgroundColor)
|
||||
graph.viewport.backgroundColor = rh.gac(context, R.attr.viewPortBackgroundColor)
|
||||
relativeLayout.addView(graph)
|
||||
|
||||
val label = TextView(context)
|
||||
|
@ -753,6 +752,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
|
||||
@SuppressLint("SetTextI18n")
|
||||
fun updateBg() {
|
||||
_binding ?: return
|
||||
val units = profileFunction.getUnits()
|
||||
binding.infoLayout.bg.text = overviewData.lastBg?.valueToUnitsString(units)
|
||||
?: rh.gs(R.string.notavailable)
|
||||
|
@ -802,6 +802,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
|
||||
fun updateProfile() {
|
||||
_binding ?: return
|
||||
val profileBackgroundColor =
|
||||
profileFunction.getProfile()?.let {
|
||||
if (it is ProfileSealed.EPS) {
|
||||
|
@ -834,6 +835,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
|
||||
private fun updateTemporaryBasal() {
|
||||
_binding ?: return
|
||||
binding.infoLayout.baseBasal.text = overviewData.temporaryBasalText(iobCobCalculator)
|
||||
binding.infoLayout.baseBasal.setTextColor(overviewData.temporaryBasalColor(context, iobCobCalculator))
|
||||
binding.infoLayout.baseBasalIcon.setImageResource(overviewData.temporaryBasalIcon(iobCobCalculator))
|
||||
|
@ -843,6 +845,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
|
||||
private fun updateExtendedBolus() {
|
||||
_binding ?: return
|
||||
val pump = activePlugin.activePump
|
||||
binding.infoLayout.extendedBolus.text = overviewData.extendedBolusText(iobCobCalculator)
|
||||
binding.infoLayout.extendedLayout.setOnClickListener {
|
||||
|
@ -852,6 +855,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
|
||||
fun updateTime() {
|
||||
_binding ?: return
|
||||
binding.infoLayout.time.text = dateUtil.timeString(dateUtil.now())
|
||||
// Status lights
|
||||
val pump = activePlugin.activePump
|
||||
|
@ -883,6 +887,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
|
||||
fun updateIobCob() {
|
||||
_binding ?: return
|
||||
binding.infoLayout.iob.text = overviewData.iobText(iobCobCalculator)
|
||||
binding.infoLayout.iobLayout.setOnClickListener {
|
||||
activity?.let { OKDialog.show(it, rh.gs(R.string.iob), overviewData.iobDialogText(iobCobCalculator)) }
|
||||
|
@ -910,6 +915,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
|
||||
@SuppressLint("SetTextI18n")
|
||||
fun updateTemporaryTarget() {
|
||||
_binding ?: return
|
||||
val units = profileFunction.getUnits()
|
||||
val tempTarget = overviewData.temporaryTarget
|
||||
if (tempTarget != null) {
|
||||
|
@ -936,6 +942,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
|
||||
private fun updateGraph() {
|
||||
_binding ?: return
|
||||
val pump = activePlugin.activePump
|
||||
val graphData = GraphData(injector, binding.graphsLayout.bgGraph, overviewData)
|
||||
val menuChartSettings = overviewMenus.setting
|
||||
|
@ -1016,11 +1023,13 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
|
||||
private fun updateCalcProgress() {
|
||||
_binding ?: return
|
||||
binding.progressBar.progress = overviewData.calcProgressPct
|
||||
binding.progressBar.visibility = (overviewData.calcProgressPct != 100).toVisibility()
|
||||
}
|
||||
|
||||
private fun updateSensitivity() {
|
||||
_binding ?: return
|
||||
if (sp.getBoolean(R.string.key_openapsama_useautosens, false) && constraintChecker.isAutosensModeEnabled().value()) {
|
||||
binding.infoLayout.sensitivityIcon.setImageResource(R.drawable.ic_swap_vert_black_48dp_green)
|
||||
} else {
|
||||
|
@ -1034,12 +1043,14 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
|
||||
private fun updatePumpStatus() {
|
||||
_binding ?: return
|
||||
val status = overviewData.pumpStatus
|
||||
binding.pumpStatus.text = status
|
||||
binding.pumpStatusLayout.visibility = (status != "").toVisibility()
|
||||
}
|
||||
|
||||
private fun updateNotification() {
|
||||
_binding ?: return
|
||||
binding.notifications.let { notificationStore.updateNotifications(it) }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import android.view.Menu
|
|||
import android.view.View
|
||||
import android.widget.ImageButton
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.annotation.ColorRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import com.google.gson.Gson
|
||||
|
@ -34,18 +33,18 @@ class OverviewMenus @Inject constructor(
|
|||
private val loop: Loop,
|
||||
private val config: Config
|
||||
) {
|
||||
enum class CharType(@StringRes val nameId: Int, @AttrRes val attrId: Int, val primary: Boolean, val secondary: Boolean, @StringRes val shortnameId: Int) {
|
||||
PRE(R.string.overview_show_predictions, R.attr.predictionColor, primary = true, secondary = false, shortnameId = R.string.prediction_shortname),
|
||||
TREAT(R.string.overview_show_treatments, R.attr.predictionColor, primary = true, secondary = false, shortnameId = R.string.treatments_shortname),
|
||||
BAS(R.string.overview_show_basals, R.attr.basal, primary = true, secondary = false,shortnameId = R.string.basal_shortname),
|
||||
ABS(R.string.overview_show_absinsulin, R.attr.iobColor, primary = false, secondary = true,shortnameId = R.string.abs_insulin_shortname),
|
||||
IOB(R.string.overview_show_iob, R.attr.iobColor, primary = false, secondary = true,shortnameId = R.string.iob),
|
||||
COB(R.string.overview_show_cob, R.attr.cobColor, primary = false, secondary = true,shortnameId = R.string.cob),
|
||||
DEV(R.string.overview_show_deviations, R.attr.bgiColor, primary = false, secondary = true,shortnameId = R.string.deviation_shortname),
|
||||
BGI(R.string.overview_show_bgi, R.attr.bgiColor, primary = false, secondary = true,shortnameId = R.string.bgi_shortname),
|
||||
SEN(R.string.overview_show_sensitivity, R.attr.ratioColor, primary = false, secondary = true,shortnameId = R.string.sensitivity_shortname),
|
||||
ACT(R.string.overview_show_activity, R.attr.activityColor, primary = true, secondary = false,shortnameId = R.string.activity_shortname),
|
||||
DEVSLOPE(R.string.overview_show_deviationslope, R.attr.devslopeposColor, primary = false, secondary = true,shortnameId = R.string.devslope_shortname)
|
||||
enum class CharType(@StringRes val nameId: Int, @AttrRes val attrId: Int, @AttrRes val attrTextId: Int, val primary: Boolean, val secondary: Boolean, @StringRes val shortnameId: Int) {
|
||||
PRE(R.string.overview_show_predictions, R.attr.predictionColor, R.attr.menuTextColor, primary = true, secondary = false, shortnameId = R.string.prediction_shortname),
|
||||
TREAT(R.string.overview_show_treatments, R.attr.predictionColor, R.attr.menuTextColor, primary = true, secondary = false, shortnameId = R.string.treatments_shortname),
|
||||
BAS(R.string.overview_show_basals, R.attr.basal, R.attr.menuTextColor, primary = true, secondary = false,shortnameId = R.string.basal_shortname),
|
||||
ABS(R.string.overview_show_absinsulin, R.attr.iobColor, R.attr.menuTextColor, primary = false, secondary = true,shortnameId = R.string.abs_insulin_shortname),
|
||||
IOB(R.string.overview_show_iob, R.attr.iobColor, R.attr.menuTextColor, primary = false, secondary = true,shortnameId = R.string.iob),
|
||||
COB(R.string.overview_show_cob, R.attr.cobColor, R.attr.menuTextColor, primary = false, secondary = true,shortnameId = R.string.cob),
|
||||
DEV(R.string.overview_show_deviations, R.attr.bgiColor, R.attr.menuTextColor, primary = false, secondary = true,shortnameId = R.string.deviation_shortname),
|
||||
BGI(R.string.overview_show_bgi, R.attr.bgiColor, R.attr.menuTextColor, primary = false, secondary = true,shortnameId = R.string.bgi_shortname),
|
||||
SEN(R.string.overview_show_sensitivity, R.attr.ratioColor, R.attr.menuTextColorInverse, primary = false, secondary = true,shortnameId = R.string.sensitivity_shortname),
|
||||
ACT(R.string.overview_show_activity, R.attr.activityColor, R.attr.menuTextColor, primary = true, secondary = false,shortnameId = R.string.activity_shortname),
|
||||
DEVSLOPE(R.string.overview_show_deviationslope, R.attr.devSlopePosColor, R.attr.menuTextColor, primary = false, secondary = true, shortnameId = R.string.devslope_shortname)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
@ -122,8 +121,8 @@ class OverviewMenus @Inject constructor(
|
|||
if (insert) {
|
||||
val item = popup.menu.add(Menu.NONE, m.ordinal + 100 * (g + 1), Menu.NONE, rh.gs(m.nameId))
|
||||
val title = item.title
|
||||
val s = SpannableString(title)
|
||||
s.setSpan(ForegroundColorSpan(rh.gc(R.color.black)), 0, s.length, 0)
|
||||
val s = SpannableString(" " + title + " ")
|
||||
s.setSpan(ForegroundColorSpan(rh.gac(context, m.attrTextId)), 0, s.length, 0)
|
||||
s.setSpan(BackgroundColorSpan(rh.gac(context, m.attrId)), 0, s.length, 0)
|
||||
item.title = s
|
||||
item.isCheckable = true
|
||||
|
|
|
@ -76,6 +76,10 @@ class QuickWizardListActivity : DaggerAppCompatActivityWithResult(), OnStartDrag
|
|||
else -> R.drawable.ic_smartphone
|
||||
}
|
||||
)
|
||||
holder.binding.device.contentDescription = when (quickWizard[position].device()) {
|
||||
QuickWizardEntry.DEVICE_WATCH -> rh.gs(R.string.a11y_only_on_watch)
|
||||
else -> rh.gs(R.string.a11y_only_on_phone)
|
||||
}
|
||||
}
|
||||
holder.binding.root.setOnClickListener {
|
||||
if (actionHelper.isNoAction) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package info.nightscout.androidaps.plugins.general.overview.dialogs
|
||||
|
||||
import android.app.TimePickerDialog
|
||||
import android.os.Bundle
|
||||
import android.text.format.DateFormat
|
||||
import android.view.LayoutInflater
|
||||
|
@ -8,6 +7,8 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import android.view.Window
|
||||
import android.view.WindowManager
|
||||
import com.google.android.material.timepicker.MaterialTimePicker
|
||||
import com.google.android.material.timepicker.TimeFormat
|
||||
import dagger.android.support.DaggerDialogFragment
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.databinding.OverviewEditquickwizardDialogBinding
|
||||
|
@ -24,6 +25,7 @@ import info.nightscout.androidaps.utils.wizard.QuickWizard
|
|||
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry
|
||||
import info.nightscout.shared.sharedPreferences.SP
|
||||
import org.json.JSONException
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
|
||||
class EditQuickWizardDialog : DaggerDialogFragment(), View.OnClickListener {
|
||||
|
@ -40,8 +42,7 @@ class EditQuickWizardDialog : DaggerDialogFragment(), View.OnClickListener {
|
|||
|
||||
private var _binding: OverviewEditquickwizardDialogBinding? = null
|
||||
|
||||
// This property is only valid between onCreateView and
|
||||
// onDestroyView.
|
||||
// This property is only valid between onCreateView and onDestroyView.
|
||||
private val binding get() = _binding!!
|
||||
|
||||
override fun onCreateView(
|
||||
|
@ -96,41 +97,35 @@ class EditQuickWizardDialog : DaggerDialogFragment(), View.OnClickListener {
|
|||
}
|
||||
binding.okcancel.cancel.setOnClickListener { dismiss() }
|
||||
|
||||
// create an OnTimeSetListener
|
||||
val fromTimeSetListener = TimePickerDialog.OnTimeSetListener { _, hour, minute ->
|
||||
fromSeconds = (T.hours(hour.toLong()).secs() + T.mins(minute.toLong()).secs()).toInt()
|
||||
binding.from.setOnClickListener {
|
||||
val clockFormat = if (DateFormat.is24HourFormat(context)) TimeFormat.CLOCK_24H else TimeFormat.CLOCK_12H
|
||||
val timePicker = MaterialTimePicker.Builder()
|
||||
.setTimeFormat(clockFormat)
|
||||
.setHour(T.secs(fromSeconds.toLong()).hours().toInt())
|
||||
.setMinute(T.secs((fromSeconds % 3600).toLong()).mins().toInt())
|
||||
.build()
|
||||
timePicker.addOnPositiveButtonClickListener {
|
||||
fromSeconds = (T.hours(timePicker.hour.toLong()).secs() + T.mins(timePicker.minute.toLong()).secs()).toInt()
|
||||
binding.from.text = dateUtil.timeString(dateUtil.secondsOfTheDayToMilliseconds(fromSeconds))
|
||||
}
|
||||
timePicker.show(parentFragmentManager, "event_time_time_picker")
|
||||
}
|
||||
|
||||
binding.from.setOnClickListener {
|
||||
context?.let {
|
||||
TimePickerDialog(
|
||||
it, R.style.MaterialPickerTheme,
|
||||
fromTimeSetListener,
|
||||
T.secs(fromSeconds.toLong()).hours().toInt(),
|
||||
T.secs((fromSeconds % 3600).toLong()).mins().toInt(),
|
||||
DateFormat.is24HourFormat(context)
|
||||
).show()
|
||||
}
|
||||
}
|
||||
fromSeconds = entry.validFrom()
|
||||
binding.from.text = dateUtil.timeString(dateUtil.secondsOfTheDayToMilliseconds(fromSeconds))
|
||||
|
||||
val toTimeSetListener = TimePickerDialog.OnTimeSetListener { _, hour, minute ->
|
||||
toSeconds = (T.hours(hour.toLong()).secs() + T.mins(minute.toLong()).secs()).toInt()
|
||||
binding.to.setOnClickListener {
|
||||
val clockFormat = if (DateFormat.is24HourFormat(context)) TimeFormat.CLOCK_24H else TimeFormat.CLOCK_12H
|
||||
val timePicker = MaterialTimePicker.Builder()
|
||||
.setTimeFormat(clockFormat)
|
||||
.setHour(T.secs(toSeconds.toLong()).hours().toInt())
|
||||
.setMinute(T.secs((toSeconds % 3600).toLong()).mins().toInt())
|
||||
.build()
|
||||
timePicker.addOnPositiveButtonClickListener {
|
||||
toSeconds = (T.hours(timePicker.hour.toLong()).secs() + T.mins(timePicker.minute.toLong()).secs()).toInt()
|
||||
binding.to.text = dateUtil.timeString(dateUtil.secondsOfTheDayToMilliseconds(toSeconds))
|
||||
}
|
||||
|
||||
binding.to.setOnClickListener {
|
||||
context?.let {
|
||||
TimePickerDialog(
|
||||
it, R.style.MaterialPickerTheme,
|
||||
toTimeSetListener,
|
||||
T.secs(toSeconds.toLong()).hours().toInt(),
|
||||
T.secs((toSeconds % 3600).toLong()).mins().toInt(),
|
||||
DateFormat.is24HourFormat(context)
|
||||
).show()
|
||||
}
|
||||
timePicker.show(parentFragmentManager, "event_time_time_picker")
|
||||
}
|
||||
|
||||
fun usePercentage(custom: Boolean) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package info.nightscout.androidaps.plugins.general.overview.graphData
|
||||
|
||||
import android.graphics.Color
|
||||
import android.graphics.DashPathEffect
|
||||
import android.graphics.Paint
|
||||
import com.jjoe64.graphview.GraphView
|
||||
|
@ -66,7 +65,7 @@ class GraphData(
|
|||
addSeries(AreaGraphSeries(inRangeAreaDataPoints).also {
|
||||
it.color = 0
|
||||
it.isDrawBackground = true
|
||||
it.backgroundColor = rh.gac(graph.context,R.attr.inrangeBackground)
|
||||
it.backgroundColor = rh.gac(graph.context,R.attr.inRangeBackground)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -201,7 +200,7 @@ class GraphData(
|
|||
paint.style = Paint.Style.STROKE
|
||||
paint.strokeWidth = 2f
|
||||
paint.pathEffect = DashPathEffect(floatArrayOf(10f, 20f), 0f)
|
||||
paint.color = Color.WHITE
|
||||
paint.color = rh.gac(graph.context, R.attr.dotLineColor)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ class BolusDataPoint @Inject constructor(
|
|||
else if (data.isValid) rh.gac(context, R.attr.bolusDataPointColor)
|
||||
else rh.gac(context, R.attr.alarmColor)
|
||||
|
||||
|
||||
override fun setY(y: Double) {
|
||||
yValue = y
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ class Session(val authHeader: String?,
|
|||
@Volatile
|
||||
internal var iterations: Int = 0
|
||||
|
||||
|
||||
fun populateHeaders(headers: Headers) {
|
||||
if (this.token == null) {
|
||||
this.token = headers.get(sessionTokenHeader)
|
||||
|
|
|
@ -95,5 +95,3 @@ class ProfileElement(ps: EffectiveProfileSwitch, serialNumber: String, dateUtil:
|
|||
internal var amount: Double
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package info.nightscout.androidaps.plugins.general.tidepool.messages
|
||||
|
||||
|
||||
class DatasetReplyMessage {
|
||||
|
||||
internal var data: Data? = null
|
||||
|
|
|
@ -115,9 +115,7 @@ class LocalProfileFragment : DaggerFragment() {
|
|||
override fun onTabUnselected(tab: TabLayout.Tab) {}
|
||||
override fun onTabReselected(tab: TabLayout.Tab) {}
|
||||
})
|
||||
|
||||
binding.dia.editText?.id?.let { binding.diaLabel.labelFor = it }
|
||||
|
||||
binding.diaLabel.labelFor = binding.dia.editTextId
|
||||
binding.unlock.setOnClickListener { queryProtection() }
|
||||
}
|
||||
|
||||
|
|
|
@ -47,10 +47,8 @@ class VirtualPumpFragment : DaggerFragment() {
|
|||
// onDestroyView.
|
||||
private val binding get() = _binding!!
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
_binding = VirtualpumpFragmentBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View =
|
||||
VirtualpumpFragmentBinding.inflate(inflater, container, false).also { _binding = it }.root
|
||||
|
||||
@Synchronized
|
||||
override fun onResume() {
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
package info.nightscout.androidaps.plugins.source
|
||||
|
||||
import android.content.Context
|
||||
import androidx.work.Worker
|
||||
import androidx.work.WorkerParameters
|
||||
import androidx.work.workDataOf
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.Constants
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.database.AppRepository
|
||||
import info.nightscout.androidaps.database.entities.GlucoseValue
|
||||
import info.nightscout.androidaps.database.transactions.CgmSourceTransaction
|
||||
import info.nightscout.androidaps.interfaces.BgSource
|
||||
import info.nightscout.androidaps.interfaces.PluginBase
|
||||
import info.nightscout.androidaps.interfaces.PluginDescription
|
||||
import info.nightscout.androidaps.interfaces.PluginType
|
||||
import info.nightscout.shared.logging.AAPSLogger
|
||||
import info.nightscout.shared.logging.LTag
|
||||
import info.nightscout.androidaps.receivers.DataWorker
|
||||
import info.nightscout.androidaps.services.Intents
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
import kotlin.math.log
|
||||
|
||||
@Singleton
|
||||
class AidexPlugin @Inject constructor(
|
||||
injector: HasAndroidInjector,
|
||||
rh: ResourceHelper,
|
||||
aapsLogger: AAPSLogger
|
||||
) : PluginBase(PluginDescription()
|
||||
.mainType(PluginType.BGSOURCE)
|
||||
.fragmentClass(BGSourceFragment::class.java.name)
|
||||
.pluginIcon((R.drawable.ic_blooddrop_48))
|
||||
.pluginName(R.string.aidex)
|
||||
.shortName(R.string.aidex_short)
|
||||
.description(R.string.description_source_aidex),
|
||||
aapsLogger, rh, injector
|
||||
), BgSource {
|
||||
|
||||
private var advancedFiltering = false
|
||||
|
||||
/**
|
||||
* Aidex App doesn't have upload to NS
|
||||
*/
|
||||
override fun shouldUploadToNs(glucoseValue: GlucoseValue): Boolean = true
|
||||
|
||||
override fun advancedFilteringSupported(): Boolean {
|
||||
return advancedFiltering
|
||||
}
|
||||
|
||||
// cannot be inner class because of needed injection
|
||||
class AidexWorker(
|
||||
context: Context,
|
||||
params: WorkerParameters
|
||||
) : Worker(context, params) {
|
||||
|
||||
@Inject lateinit var aapsLogger: AAPSLogger
|
||||
@Inject lateinit var aidexPlugin: AidexPlugin
|
||||
@Inject lateinit var repository: AppRepository
|
||||
@Inject lateinit var dataWorker: DataWorker
|
||||
|
||||
init {
|
||||
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
|
||||
}
|
||||
|
||||
override fun doWork(): Result {
|
||||
var ret = Result.success()
|
||||
|
||||
if (!aidexPlugin.isEnabled()) return Result.success(workDataOf("Result" to "Plugin not enabled"))
|
||||
val bundle = dataWorker.pickupBundle(inputData.getLong(DataWorker.STORE_KEY, -1))
|
||||
?: return Result.failure(workDataOf("Error" to "missing input data"))
|
||||
|
||||
aapsLogger.debug(LTag.BGSOURCE, "Received Aidex data: $bundle")
|
||||
|
||||
if (bundle.containsKey(Intents.AIDEX_TRANSMITTER_SN)) aapsLogger.debug(LTag.BGSOURCE, "transmitterSerialNumber: " + bundle.getString(Intents.AIDEX_TRANSMITTER_SN))
|
||||
if (bundle.containsKey(Intents.AIDEX_SENSOR_ID)) aapsLogger.debug(LTag.BGSOURCE, "sensorId: " + bundle.getString(Intents.AIDEX_SENSOR_ID))
|
||||
|
||||
val glucoseValues = mutableListOf<CgmSourceTransaction.TransactionGlucoseValue>()
|
||||
|
||||
val timestamp = bundle.getLong(Intents.AIDEX_TIMESTAMP, 0)
|
||||
val bgType = bundle.getString(Intents.AIDEX_BG_TYPE, "mg/dl")
|
||||
val bgValue = bundle.getDouble(Intents.AIDEX_BG_VALUE, 0.0)
|
||||
|
||||
val bgValueTarget = if (bgType.equals("mg/dl")) bgValue else bgValue * Constants.MMOLL_TO_MGDL
|
||||
|
||||
aapsLogger.debug(LTag.BGSOURCE, "Received Aidex broadcast [time=$timestamp, bgType=$bgType, value=$bgValue, targetValue=$bgValueTarget")
|
||||
|
||||
glucoseValues += CgmSourceTransaction.TransactionGlucoseValue(
|
||||
timestamp = timestamp,
|
||||
value = bgValueTarget,
|
||||
raw = null,
|
||||
noise = null,
|
||||
trendArrow = GlucoseValue.TrendArrow.fromString(bundle.getString(Intents.AIDEX_BG_SLOPE_NAME)),
|
||||
sourceSensor = GlucoseValue.SourceSensor.AIDEX
|
||||
)
|
||||
repository.runTransactionForResult(CgmSourceTransaction(glucoseValues, emptyList(), null))
|
||||
.doOnError {
|
||||
aapsLogger.error(LTag.DATABASE, "Error while saving values from Aidex", it)
|
||||
ret = Result.failure(workDataOf("Error" to it.toString()))
|
||||
}
|
||||
.blockingGet()
|
||||
.also { savedValues ->
|
||||
savedValues.all().forEach {
|
||||
aapsLogger.debug(LTag.DATABASE, "Inserted bg $it")
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
}
|
||||
}
|
|
@ -197,6 +197,7 @@ class BGSourceFragment : DaggerFragment() {
|
|||
R.string.tomato -> Sources.Tomato
|
||||
R.string.glunovo -> Sources.Glunovo
|
||||
R.string.xdrip -> Sources.Xdrip
|
||||
R.string.aidex -> Sources.Aidex
|
||||
else -> Sources.Unknown
|
||||
}
|
||||
uel.log(
|
||||
|
|
|
@ -28,7 +28,6 @@ open class DataReceiver : DaggerBroadcastReceiver() {
|
|||
val bundle = intent.extras ?: return
|
||||
aapsLogger.debug(LTag.DATABASE, "onReceive ${intent.action} ${BundleLogger.log(bundle)}")
|
||||
|
||||
|
||||
when (intent.action) {
|
||||
Intents.ACTION_NEW_BG_ESTIMATE ->
|
||||
OneTimeWorkRequest.Builder(XdripPlugin.XdripWorker::class.java)
|
||||
|
@ -67,6 +66,9 @@ open class DataReceiver : DaggerBroadcastReceiver() {
|
|||
Intents.DEXCOM_BG ->
|
||||
OneTimeWorkRequest.Builder(DexcomPlugin.DexcomWorker::class.java)
|
||||
.setInputData(dataWorker.storeInputData(bundle, intent)).build()
|
||||
Intents.AIDEX_NEW_BG_ESTIMATE ->
|
||||
OneTimeWorkRequest.Builder(AidexPlugin.AidexWorker::class.java)
|
||||
.setInputData(dataWorker.storeInputData(bundle, intent)).build()
|
||||
else -> null
|
||||
}?.let { request -> dataWorker.enqueue(request) }
|
||||
}
|
||||
|
|
|
@ -31,6 +31,15 @@ interface Intents {
|
|||
const val POCTECH_BG = "com.china.poctech.data"
|
||||
const val TOMATO_BG = "com.fanqies.tomatofn.BgEstimate"
|
||||
|
||||
// Aidex -> AAPS
|
||||
var AIDEX_NEW_BG_ESTIMATE = "com.microtechmd.cgms.aidex.action.BgEstimate"
|
||||
var AIDEX_BG_TYPE = "com.microtechmd.cgms.aidex.BgType"
|
||||
var AIDEX_BG_VALUE = "com.microtechmd.cgms.aidex.BgValue"
|
||||
var AIDEX_BG_SLOPE_NAME = "com.microtechmd.cgms.aidex.BgSlopeName"
|
||||
var AIDEX_TIMESTAMP = "com.microtechmd.cgms.aidex.Time" // epoch in ms
|
||||
var AIDEX_TRANSMITTER_SN = "com.microtechmd.cgms.aidex.TransmitterSerialNumber"
|
||||
var AIDEX_SENSOR_ID = "com.microtechmd.cgms.aidex.SensorId"
|
||||
|
||||
// Broadcast status
|
||||
const val AAPS_BROADCAST = "info.nightscout.androidaps.status"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ package info.nightscout.androidaps.skins
|
|||
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.View.GONE
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.marginStart
|
||||
import info.nightscout.androidaps.interfaces.Config
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.databinding.ActionsFragmentBinding
|
||||
|
@ -38,6 +40,38 @@ class SkinLowRes @Inject constructor(private val config: Config) : SkinInterface
|
|||
|
||||
override fun preProcessLandscapeOverviewLayout(dm: DisplayMetrics, binding: OverviewFragmentBinding, isLandscape: Boolean, isTablet: Boolean, isSmallHeight: Boolean) {
|
||||
if (!config.NSCLIENT && isLandscape) moveButtonsLayout(binding.root)
|
||||
|
||||
binding.apply {
|
||||
infoCard.elevation = 0F
|
||||
infoCard.radius = 0F
|
||||
val paramInfo = (infoCard.layoutParams as ViewGroup.MarginLayoutParams).apply {
|
||||
setMargins(0,0,0,0)
|
||||
}
|
||||
infoCard.layoutParams = paramInfo
|
||||
|
||||
statusCard.elevation = 0F
|
||||
statusCard.radius = 0F
|
||||
statusCard.strokeWidth = 1
|
||||
val paramStatus = (statusCard.layoutParams as ViewGroup.MarginLayoutParams).apply {
|
||||
setMargins(0,0,0,0)
|
||||
}
|
||||
statusCard.layoutParams = paramStatus
|
||||
|
||||
nsclientCard.elevation = 0F
|
||||
nsclientCard.radius = 0F
|
||||
val paramNsClient = (nsclientCard.layoutParams as ViewGroup.MarginLayoutParams).apply {
|
||||
setMargins(0,0,0,0)
|
||||
}
|
||||
nsclientCard.layoutParams = paramNsClient
|
||||
|
||||
graphCard.elevation = 0F
|
||||
graphCard.radius = 0F
|
||||
val paramGraph = (graphCard.layoutParams as ViewGroup.MarginLayoutParams).apply {
|
||||
setMargins(0,0,0,0)
|
||||
}
|
||||
graphCard.layoutParams = paramGraph
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import androidx.annotation.DrawableRes
|
|||
import androidx.annotation.StringRes
|
||||
import androidx.annotation.StyleRes
|
||||
import androidx.appcompat.view.ContextThemeWrapper
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.extensions.runOnUiThread
|
||||
import info.nightscout.androidaps.plugins.general.maintenance.formats.Prefs
|
||||
|
@ -49,7 +50,6 @@ object PrefImportSummaryDialog {
|
|||
var idx = 0
|
||||
val details = LinkedList<String>()
|
||||
|
||||
|
||||
for ((metaKey, metaEntry) in prefs.metadata) {
|
||||
val rowLayout = LayoutInflater.from(themedCtx).inflate(R.layout.import_summary_item, null)
|
||||
val label = (rowLayout.findViewById<View>(R.id.summary_text) as TextView)
|
||||
|
@ -92,7 +92,7 @@ object PrefImportSummaryDialog {
|
|||
webView.setBackgroundColor(Color.TRANSPARENT)
|
||||
webView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null)
|
||||
|
||||
AlertDialogHelper.Builder(context, R.style.DialogTheme)
|
||||
MaterialAlertDialogBuilder(context, R.style.DialogTheme)
|
||||
.setCustomTitle(
|
||||
AlertDialogHelper.buildCustomTitle(
|
||||
context,
|
||||
|
@ -109,11 +109,10 @@ object PrefImportSummaryDialog {
|
|||
}
|
||||
}
|
||||
|
||||
val builder = AlertDialogHelper.Builder(context, theme)
|
||||
val builder = MaterialAlertDialogBuilder(context, theme)
|
||||
.setMessage(context.getString(messageRes))
|
||||
.setCustomTitle(AlertDialogHelper.buildCustomTitle(context, context.getString(R.string.nav_import), headerIcon, theme))
|
||||
.setView(innerLayout)
|
||||
|
||||
.setNegativeButton(android.R.string.cancel) { dialog: DialogInterface, _: Int ->
|
||||
dialog.dismiss()
|
||||
SystemClock.sleep(100)
|
||||
|
|
|
@ -8,6 +8,7 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.DrawableRes
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.extensions.runOnUiThread
|
||||
|
||||
|
@ -19,7 +20,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
|
||||
|
||||
AlertDialogHelper.Builder(context, R.style.DialogTheme)
|
||||
MaterialAlertDialogBuilder(context, R.style.DialogTheme)
|
||||
.setMessage(message)
|
||||
.setCustomTitle(
|
||||
AlertDialogHelper.buildCustomTitle(
|
||||
|
@ -32,7 +33,6 @@ object TwoMessagesAlertDialog {
|
|||
dialog.dismiss()
|
||||
SystemClock.sleep(100)
|
||||
if (ok != null) runOnUiThread { ok() }
|
||||
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel) { dialog: DialogInterface, _: Int ->
|
||||
dialog.dismiss()
|
||||
|
|
|
@ -105,17 +105,17 @@ class Widget : AppWidgetProvider() {
|
|||
views.setTextViewText(R.id.bg, overviewData.lastBg?.valueToUnitsString(units) ?: rh.gs(R.string.notavailable))
|
||||
views.setTextColor(
|
||||
R.id.bg, when {
|
||||
overviewData.isLow -> rh.gc(R.color.low)
|
||||
overviewData.isHigh -> rh.gc(R.color.high)
|
||||
else -> rh.gc(R.color.inrange)
|
||||
overviewData.isLow -> rh.gc(R.color.widget_low)
|
||||
overviewData.isHigh -> rh.gc(R.color.widget_high)
|
||||
else -> rh.gc(R.color.widget_inrange)
|
||||
}
|
||||
)
|
||||
views.setImageViewResource(R.id.arrow, trendCalculator.getTrendArrow(overviewData.lastBg).directionToIcon())
|
||||
views.setInt(
|
||||
R.id.arrow, "setColorFilter", when {
|
||||
overviewData.isLow -> rh.gc(R.color.low)
|
||||
overviewData.isHigh -> rh.gc(R.color.high)
|
||||
else -> rh.gc(R.color.inrange)
|
||||
overviewData.isLow -> rh.gc(R.color.widget_low)
|
||||
overviewData.isHigh -> rh.gc(R.color.widget_high)
|
||||
else -> rh.gc(R.color.widget_inrange)
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -140,7 +140,7 @@ class Widget : AppWidgetProvider() {
|
|||
|
||||
private fun updateTemporaryBasal(views: RemoteViews) {
|
||||
views.setTextViewText(R.id.base_basal, overviewData.temporaryBasalText(iobCobCalculator))
|
||||
views.setTextColor(R.id.base_basal, iobCobCalculator.getTempBasalIncludingConvertedExtended(dateUtil.now())?.let { rh.gc(R.color.basal) }
|
||||
views.setTextColor(R.id.base_basal, iobCobCalculator.getTempBasalIncludingConvertedExtended(dateUtil.now())?.let { rh.gc(R.color.widget_basal) }
|
||||
?: rh.gc(R.color.white))
|
||||
views.setImageViewResource(R.id.base_basal_icon, overviewData.temporaryBasalIcon(iobCobCalculator))
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ class Widget : AppWidgetProvider() {
|
|||
// this is crashing, use background as text for now
|
||||
//views.setTextColor(R.id.temp_target, rh.gc(R.color.ribbonTextWarning))
|
||||
//views.setInt(R.id.temp_target, "setBackgroundColor", rh.gc(R.color.ribbonWarning))
|
||||
views.setTextColor(R.id.temp_target, rh.gc(R.color.ribbonWarning))
|
||||
views.setTextColor(R.id.temp_target, rh.gc(R.color.widget_ribbonWarning))
|
||||
views.setTextViewText(R.id.temp_target, Profile.toTargetRangeString(tempTarget.lowTarget, tempTarget.highTarget, GlucoseUnit.MGDL, units) + " " + dateUtil.untilString(tempTarget.end, rh))
|
||||
} else {
|
||||
// If the target is not the same as set in the profile then oref has overridden it
|
||||
|
@ -189,12 +189,12 @@ class Widget : AppWidgetProvider() {
|
|||
// this is crashing, use background as text for now
|
||||
//views.setTextColor(R.id.temp_target, rh.gc(R.color.ribbonTextWarning))
|
||||
//views.setInt(R.id.temp_target, "setBackgroundResource", rh.gc(R.color.tempTargetBackground))
|
||||
views.setTextColor(R.id.temp_target, rh.gc(R.color.ribbonWarning))
|
||||
views.setTextColor(R.id.temp_target, rh.gc(R.color.widget_ribbonWarning))
|
||||
} else {
|
||||
// this is crashing, use background as text for now
|
||||
//views.setTextColor(R.id.temp_target, rh.gc(R.color.ribbonTextDefault))
|
||||
//views.setInt(R.id.temp_target, "setBackgroundColor", rh.gc(R.color.ribbonDefault))
|
||||
views.setTextColor(R.id.temp_target, rh.gc(R.color.ribbonTextDefault))
|
||||
views.setTextColor(R.id.temp_target, rh.gc(R.color.widget_ribbonTextDefault))
|
||||
views.setTextViewText(R.id.temp_target, Profile.toTargetRangeString(profile.getTargetLowMgdl(), profile.getTargetHighMgdl(), GlucoseUnit.MGDL, units))
|
||||
}
|
||||
}
|
||||
|
@ -206,14 +206,14 @@ class Widget : AppWidgetProvider() {
|
|||
profileFunction.getProfile()?.let {
|
||||
if (it is ProfileSealed.EPS) {
|
||||
if (it.value.originalPercentage != 100 || it.value.originalTimeshift != 0L || it.value.originalDuration != 0L)
|
||||
rh.gc(R.color.ribbonWarning)
|
||||
else rh.gc(R.color.ribbonTextDefault)
|
||||
rh.gc(R.color.widget_ribbonWarning)
|
||||
else rh.gc(R.color.widget_ribbonTextDefault)
|
||||
} else if (it is ProfileSealed.PS) {
|
||||
rh.gc(R.color.ribbonTextDefault)
|
||||
rh.gc(R.color.widget_ribbonTextDefault)
|
||||
} else {
|
||||
rh.gc(R.color.ribbonTextDefault)
|
||||
rh.gc(R.color.widget_ribbonTextDefault)
|
||||
}
|
||||
} ?: rh.gc(R.color.ribbonCritical)
|
||||
} ?: rh.gc(R.color.widget_ribbonCritical)
|
||||
|
||||
views.setTextViewText(R.id.active_profile, profileFunction.getProfileNameWithRemainingTime())
|
||||
// this is crashing, use background as text for now
|
||||
|
|
|
@ -30,9 +30,10 @@ class PrepareBasalDataWorker(
|
|||
@Inject lateinit var profileFunction: ProfileFunction
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
|
||||
var ctx: Context
|
||||
init {
|
||||
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
|
||||
ctx = rh.getThemedCtx(context)
|
||||
}
|
||||
|
||||
class PrepareBasalData(
|
||||
|
@ -116,12 +117,12 @@ class PrepareBasalDataWorker(
|
|||
// create series
|
||||
data.overviewData.baseBasalGraphSeries = LineGraphSeries(Array(baseBasalArray.size) { i -> baseBasalArray[i] }).also {
|
||||
it.isDrawBackground = true
|
||||
it.backgroundColor = rh.gc(R.color.basebasal)
|
||||
it.backgroundColor = rh.gac(ctx, R.attr.baseBasalColor )
|
||||
it.thickness = 0
|
||||
}
|
||||
data.overviewData.tempBasalGraphSeries = LineGraphSeries(Array(tempBasalArray.size) { i -> tempBasalArray[i] }).also {
|
||||
it.isDrawBackground = true
|
||||
it.backgroundColor = rh.gc(R.color.tempbasal)
|
||||
it.backgroundColor = rh.gac(ctx, R.attr.tempBasalColor )
|
||||
it.thickness = 0
|
||||
}
|
||||
data.overviewData.basalLineGraphSeries = LineGraphSeries(Array(basalLineArray.size) { i -> basalLineArray[i] }).also {
|
||||
|
@ -129,14 +130,14 @@ class PrepareBasalDataWorker(
|
|||
paint.style = Paint.Style.STROKE
|
||||
paint.strokeWidth = rh.getDisplayMetrics().scaledDensity * 2
|
||||
paint.pathEffect = DashPathEffect(floatArrayOf(2f, 4f), 0f)
|
||||
paint.color = rh.gc(R.color.basal)
|
||||
paint.color = rh.gac(ctx, R.attr.basal )
|
||||
})
|
||||
}
|
||||
data.overviewData.absoluteBasalGraphSeries = LineGraphSeries(Array(absoluteBasalLineArray.size) { i -> absoluteBasalLineArray[i] }).also {
|
||||
it.setCustomPaint(Paint().also { absolutePaint ->
|
||||
absolutePaint.style = Paint.Style.STROKE
|
||||
absolutePaint.strokeWidth = rh.getDisplayMetrics().scaledDensity * 2
|
||||
absolutePaint.color = rh.gc(R.color.basal)
|
||||
absolutePaint.color =rh.gac(ctx, R.attr.basal )
|
||||
})
|
||||
}
|
||||
rxBus.send(EventIobCalculationProgress(CalculationWorkflow.ProgressData.PREPARE_BASAL_DATA, 100, null))
|
||||
|
|
|
@ -51,9 +51,10 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
@Inject lateinit var aapsLogger: AAPSLogger
|
||||
@Inject lateinit var repository: AppRepository
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
|
||||
var ctx: Context
|
||||
init {
|
||||
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
|
||||
ctx = rh.getThemedCtx(context)
|
||||
}
|
||||
|
||||
class PrepareIobAutosensData(
|
||||
|
@ -64,7 +65,6 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
override fun doWork(): Result {
|
||||
val data = dataWorker.pickupObject(inputData.getLong(DataWorker.STORE_KEY, -1)) as PrepareIobAutosensData?
|
||||
?: return Result.failure(workDataOf("Error" to "missing input data"))
|
||||
|
||||
rxBus.send(EventIobCalculationProgress(CalculationWorkflow.ProgressData.PREPARE_IOB_AUTOSENS_DATA, 0, null))
|
||||
val iobArray: MutableList<ScaledDataPoint> = ArrayList()
|
||||
val absIobArray: MutableList<ScaledDataPoint> = ArrayList()
|
||||
|
@ -158,15 +158,15 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
|
||||
// DEVIATIONS
|
||||
if (autosensData != null) {
|
||||
var color = rh.gc(R.color.deviationblack) // "="
|
||||
var color = rh.gac( ctx, R.attr.deviationBlackColor) // "="
|
||||
if (autosensData.type == "" || autosensData.type == "non-meal") {
|
||||
if (autosensData.pastSensitivity == "C") color = rh.gc(R.color.deviationgrey)
|
||||
if (autosensData.pastSensitivity == "+") color = rh.gc(R.color.deviationgreen)
|
||||
if (autosensData.pastSensitivity == "-") color = rh.gc(R.color.deviationred)
|
||||
if (autosensData.pastSensitivity == "C") color = rh.gac( ctx, R.attr.deviationGreyColor)
|
||||
if (autosensData.pastSensitivity == "+") color = rh.gac( ctx, R.attr.deviationGreenColor)
|
||||
if (autosensData.pastSensitivity == "-") color = rh.gac( ctx, R.attr.deviationRedColor)
|
||||
} else if (autosensData.type == "uam") {
|
||||
color = rh.gc(R.color.uam)
|
||||
color = rh.gac( ctx, R.attr.uamColor)
|
||||
} else if (autosensData.type == "csf") {
|
||||
color = rh.gc(R.color.deviationgrey)
|
||||
color = rh.gac( ctx, R.attr.deviationGreyColor)
|
||||
}
|
||||
devArray.add(OverviewPlugin.DeviationDataPoint(time.toDouble(), autosensData.deviation, color, data.overviewData.devScale))
|
||||
data.overviewData.maxDevValueFound = maxOf(data.overviewData.maxDevValueFound, abs(autosensData.deviation), abs(bgi))
|
||||
|
@ -192,14 +192,14 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
// IOB
|
||||
data.overviewData.iobSeries = FixedLineGraphSeries(Array(iobArray.size) { i -> iobArray[i] }).also {
|
||||
it.isDrawBackground = true
|
||||
it.backgroundColor = -0x7f000001 and rh.gc(R.color.iob) //50%
|
||||
it.color = rh.gc(R.color.iob)
|
||||
it.backgroundColor = -0x7f000001 and rh.gac( ctx, R.attr.iobColor) //50%
|
||||
it.color = rh.gac( ctx, R.attr.iobColor)
|
||||
it.thickness = 3
|
||||
}
|
||||
data.overviewData.absIobSeries = FixedLineGraphSeries(Array(absIobArray.size) { i -> absIobArray[i] }).also {
|
||||
it.isDrawBackground = true
|
||||
it.backgroundColor = -0x7f000001 and rh.gc(R.color.iob) //50%
|
||||
it.color = rh.gc(R.color.iob)
|
||||
it.backgroundColor = -0x7f000001 and rh.gac( ctx, R.attr.iobColor) //50%
|
||||
it.color = rh.gac( ctx, R.attr.iobColor)
|
||||
it.thickness = 3
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
val iobPrediction: MutableList<DataPointWithLabelInterface> = ArrayList()
|
||||
val iobPredictionArray = data.iobCobCalculator.calculateIobArrayForSMB(lastAutosensResult, SMBDefaults.exercise_mode, SMBDefaults.half_basal_exercise_target, isTempTarget)
|
||||
for (i in iobPredictionArray) {
|
||||
iobPrediction.add(i.setColor(rh.gc(R.color.iobPredAS)))
|
||||
iobPrediction.add(i.setColor(rh.gac( ctx, R.attr.iobPredASColor)))
|
||||
data.overviewData.maxIobValueFound = max(data.overviewData.maxIobValueFound, abs(i.iob))
|
||||
}
|
||||
data.overviewData.iobPredictions1Series = PointsWithLabelGraphSeries(Array(iobPrediction.size) { i -> iobPrediction[i] })
|
||||
|
@ -222,8 +222,8 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
// COB
|
||||
data.overviewData.cobSeries = FixedLineGraphSeries(Array(cobArray.size) { i -> cobArray[i] }).also {
|
||||
it.isDrawBackground = true
|
||||
it.backgroundColor = -0x7f000001 and rh.gc(R.color.cob) //50%
|
||||
it.color = rh.gc(R.color.cob)
|
||||
it.backgroundColor = -0x7f000001 and rh.gac( ctx, R.attr.cobColor) //50%
|
||||
it.color = rh.gac( ctx, R.attr.cobColor)
|
||||
it.thickness = 3
|
||||
}
|
||||
data.overviewData.cobMinFailOverSeries = PointsWithLabelGraphSeries(Array(minFailOverActiveList.size) { i -> minFailOverActiveList[i] })
|
||||
|
@ -231,7 +231,7 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
// ACTIVITY
|
||||
data.overviewData.activitySeries = FixedLineGraphSeries(Array(actArrayHist.size) { i -> actArrayHist[i] }).also {
|
||||
it.isDrawBackground = false
|
||||
it.color = rh.gc(R.color.activity)
|
||||
it.color = rh.gac( ctx, R.attr.activityColor)
|
||||
it.thickness = 3
|
||||
}
|
||||
data.overviewData.activityPredictionSeries = FixedLineGraphSeries(Array(actArrayPrediction.size) { i -> actArrayPrediction[i] }).also {
|
||||
|
@ -239,14 +239,14 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
paint.style = Paint.Style.STROKE
|
||||
paint.strokeWidth = 3f
|
||||
paint.pathEffect = DashPathEffect(floatArrayOf(4f, 4f), 0f)
|
||||
paint.color = rh.gc(R.color.activity)
|
||||
paint.color = rh.gac( ctx, R.attr.activityColor)
|
||||
})
|
||||
}
|
||||
|
||||
// BGI
|
||||
data.overviewData.minusBgiSeries = FixedLineGraphSeries(Array(bgiArrayHist.size) { i -> bgiArrayHist[i] }).also {
|
||||
it.isDrawBackground = false
|
||||
it.color = rh.gc(R.color.bgi)
|
||||
it.color = rh.gac( ctx, R.attr.bgiColor)
|
||||
it.thickness = 3
|
||||
}
|
||||
data.overviewData.minusBgiHistSeries = FixedLineGraphSeries(Array(bgiArrayPrediction.size) { i -> bgiArrayPrediction[i] }).also {
|
||||
|
@ -254,7 +254,7 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
paint.style = Paint.Style.STROKE
|
||||
paint.strokeWidth = 3f
|
||||
paint.pathEffect = DashPathEffect(floatArrayOf(4f, 4f), 0f)
|
||||
paint.color = rh.gc(R.color.bgi)
|
||||
paint.color = rh.gac( ctx, R.attr.bgiColor)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -265,17 +265,17 @@ class PrepareIobAutosensGraphDataWorker(
|
|||
|
||||
// RATIO
|
||||
data.overviewData.ratioSeries = LineGraphSeries(Array(ratioArray.size) { i -> ratioArray[i] }).also {
|
||||
it.color = rh.gc(R.color.ratio)
|
||||
it.color = rh.gac( ctx, R.attr.ratioColor)
|
||||
it.thickness = 3
|
||||
}
|
||||
|
||||
// DEV SLOPE
|
||||
data.overviewData.dsMaxSeries = LineGraphSeries(Array(dsMaxArray.size) { i -> dsMaxArray[i] }).also {
|
||||
it.color = rh.gc(R.color.devslopepos)
|
||||
it.color = rh.gac( ctx, R.attr.devSlopePosColor)
|
||||
it.thickness = 3
|
||||
}
|
||||
data.overviewData.dsMinSeries = LineGraphSeries(Array(dsMinArray.size) { i -> dsMinArray[i] }).also {
|
||||
it.color = rh.gc(R.color.devslopeneg)
|
||||
it.color = rh.gac( ctx, R.attr.devSlopeNegColor)
|
||||
it.thickness = 3
|
||||
}
|
||||
rxBus.send(EventIobCalculationProgress(CalculationWorkflow.ProgressData.PREPARE_IOB_AUTOSENS_DATA, 100, null))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package info.nightscout.androidaps.workflow
|
||||
|
||||
import android.content.Context
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.work.Worker
|
||||
import androidx.work.WorkerParameters
|
||||
import androidx.work.workDataOf
|
||||
|
@ -33,9 +34,10 @@ class PrepareTemporaryTargetDataWorker(
|
|||
@Inject lateinit var repository: AppRepository
|
||||
@Inject lateinit var loop: Loop
|
||||
@Inject lateinit var rxBus: RxBus
|
||||
|
||||
var ctx: Context
|
||||
init {
|
||||
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
|
||||
ctx = rh.getThemedCtx(context)
|
||||
}
|
||||
|
||||
class PrepareTemporaryTargetData(
|
||||
|
@ -76,7 +78,7 @@ class PrepareTemporaryTargetDataWorker(
|
|||
// create series
|
||||
data.overviewData.temporaryTargetSeries = LineGraphSeries(Array(targetsSeriesArray.size) { i -> targetsSeriesArray[i] }).also {
|
||||
it.isDrawBackground = false
|
||||
it.color = rh.gc(R.color.tempTargetBackground)
|
||||
it.color = rh.gac(ctx, R.attr.tempTargetBackgroundColor )
|
||||
it.thickness = 2
|
||||
}
|
||||
rxBus.send(EventIobCalculationProgress(CalculationWorkflow.ProgressData.PREPARE_TEMPORARY_TARGET_DATA, 100, null))
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12.107,3.666c-4.603,0 -8.335,3.732 -8.335,8.335s3.732,8.335 8.335,8.335s8.335,-3.731 8.335,-8.335V3.666H12.107zM12.107,18.335c-3.498,0 -6.334,-2.836 -6.334,-6.334c0,-3.498 2.836,-6.334 6.334,-6.334c3.498,0 6.334,2.836 6.334,6.334C18.442,15.499 15.606,18.335 12.107,18.335z"
|
||||
android:fillColor="@color/byodagray"/>
|
||||
android:fillColor="@color/byodaGray"/>
|
||||
</vector>
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M3.517,11.496h15.717v1.009h-15.717z"
|
||||
android:fillColor="#CF8BFE"/>
|
||||
android:fillColor="?attr/basalNoTbrColor"/>
|
||||
</vector>
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M16.578,18.033l0,-11.043l-3.698,0l0,11.043l-9.363,0l0,-1.01l8.354,0l0,-11.041l5.717,0l0,11.041l1.645,0l0,1.01z"
|
||||
android:fillColor="#CF8BFE"/>
|
||||
android:fillColor="?attr/basalStartColor"/>
|
||||
</vector>
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M16.578,18.033l0,-11.043l-3.698,0l0,11.043l-9.363,0l0,-1.01l8.354,0l0,-11.041l5.717,0l0,11.041l1.645,0l0,1.01z"
|
||||
android:fillColor="#CF8BFE"/>
|
||||
android:fillColor="?attr/basalHighColor"/>
|
||||
</vector>
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M11.871,18.026l0,-11.042l-8.354,0l0,-1.009l9.363,0l0,11.041l3.698,0l0,-11.041l2.655,0l0,1.009l-1.645,0l0,11.042z"
|
||||
android:fillColor="#CF8BFE"/>
|
||||
android:fillColor="?attr/basalLowColor"/>
|
||||
</vector>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<vector android:height="48dp" android:tint="#008585"
|
||||
<vector android:height="48dp" android:tint="?attr/sensColor"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M16,17.01V10h-2v7.01h-3L15,21l4,-3.99h-3zM9,3L5,6.99h3V14h2V6.99h3L9,3z"/>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
android:fillColor="@color/tempTargetConfirmation"/>
|
||||
<path
|
||||
android:pathData="M5.453,9.325c-0.003,0 -0.006,0 -0.01,0C5.031,9.317 4.661,8.827 4.43,7.979C4.261,7.361 4.108,6.716 3.96,6.092C3.867,5.701 3.774,5.31 3.677,4.924l-0.064,-0.26C3.394,3.77 3.168,2.847 2.577,2.743C2.509,2.731 2.463,2.665 2.475,2.595c0.012,-0.07 0.077,-0.114 0.146,-0.104c0.752,0.133 0.999,1.138 1.237,2.11l0.064,0.259c0.097,0.388 0.19,0.78 0.283,1.172c0.147,0.622 0.3,1.264 0.468,1.878C4.864,8.61 5.168,9.064 5.448,9.069c0.001,0 0.003,0 0.005,0c0.263,0 0.537,-0.394 0.753,-1.083C6.317,7.63 6.413,7.247 6.505,6.877l0.074,-0.293C6.66,6.262 6.737,5.935 6.815,5.609C6.973,4.94 7.137,4.248 7.336,3.608c0.221,-0.71 0.551,-1.103 0.928,-1.106c0.002,0 0.003,0 0.005,0c0.379,0 0.717,0.39 0.951,1.1c0.165,0.5 0.305,1.039 0.439,1.56l0.105,0.403c0.087,0.332 0.171,0.668 0.255,1.004c0.143,0.574 0.29,1.169 0.456,1.729c0.136,0.462 0.367,0.757 0.603,0.769c0.211,0.026 0.432,-0.218 0.6,-0.625c0.161,-0.391 0.309,-0.847 0.451,-1.393c0.198,-0.76 0.385,-1.53 0.572,-2.3c0.086,-0.355 0.173,-0.711 0.26,-1.065c0.167,-0.676 0.481,-1.066 0.961,-1.191c0.066,-0.017 0.136,0.024 0.154,0.092c0.017,0.068 -0.023,0.138 -0.091,0.156c-0.387,0.101 -0.634,0.421 -0.779,1.005c-0.087,0.354 -0.174,0.709 -0.26,1.064c-0.188,0.771 -0.375,1.543 -0.573,2.304c-0.145,0.557 -0.297,1.024 -0.462,1.426c-0.289,0.703 -0.651,0.793 -0.846,0.782c-0.35,-0.018 -0.661,-0.374 -0.832,-0.951c-0.167,-0.565 -0.315,-1.163 -0.459,-1.74c-0.083,-0.335 -0.166,-0.67 -0.253,-1.001L9.415,5.226C9.282,4.709 9.143,4.174 8.981,3.682c-0.192,-0.58 -0.458,-0.926 -0.712,-0.926c-0.001,0 -0.001,0 -0.002,0c-0.252,0.002 -0.51,0.349 -0.69,0.928C7.38,4.316 7.217,5.004 7.06,5.668C6.982,5.996 6.905,6.324 6.823,6.647L6.75,6.939C6.656,7.314 6.56,7.701 6.446,8.063C6.121,9.103 5.728,9.325 5.453,9.325z"
|
||||
android:fillColor="@color/inrange"/>
|
||||
android:fillColor="@color/inRange"/>
|
||||
<path
|
||||
android:pathData="M13.949,6.338h-2.831c-0.232,0 -0.421,-0.193 -0.421,-0.431V4.19H5.856l0,1.717c0,0.238 -0.188,0.431 -0.42,0.431h-2.84c-0.232,0 -0.42,-0.193 -0.42,-0.431c0,-0.238 0.188,-0.431 0.42,-0.431h2.42l0,-1.717c0,-0.238 0.188,-0.431 0.42,-0.431h5.682c0.232,0 0.421,0.193 0.421,0.431v1.717h2.411c0.232,0 0.421,0.193 0.421,0.431C14.37,6.145 14.181,6.338 13.949,6.338z"
|
||||
android:fillColor="@color/tempTargetConfirmation"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M7.242,17.689c-0.005,0 -0.011,0 -0.017,0c-0.695,-0.013 -1.318,-0.829 -1.709,-2.24c-0.285,-1.029 -0.542,-2.103 -0.792,-3.141c-0.156,-0.65 -0.313,-1.301 -0.476,-1.945L4.14,9.929c-0.369,-1.486 -0.75,-3.024 -1.746,-3.197c-0.116,-0.02 -0.193,-0.13 -0.173,-0.246s0.129,-0.189 0.246,-0.173C3.735,6.534 4.15,8.208 4.552,9.827l0.108,0.432c0.164,0.646 0.321,1.298 0.478,1.951c0.249,1.035 0.506,2.104 0.789,3.127c0.322,1.163 0.834,1.92 1.307,1.929c0.002,0 0.005,0 0.008,0c0.443,0 0.905,-0.656 1.269,-1.804c0.188,-0.592 0.349,-1.229 0.504,-1.847l0.124,-0.487c0.138,-0.536 0.268,-1.08 0.398,-1.624c0.267,-1.114 0.542,-2.265 0.878,-3.332c0.373,-1.182 0.928,-1.836 1.565,-1.842c0.003,0 0.005,0 0.008,0c0.639,0 1.208,0.65 1.603,1.832c0.278,0.833 0.514,1.729 0.74,2.598l0.177,0.671c0.147,0.553 0.288,1.112 0.43,1.672c0.24,0.956 0.489,1.945 0.769,2.879c0.229,0.77 0.619,1.26 1.017,1.28c0.356,0.043 0.729,-0.362 1.011,-1.041c0.271,-0.651 0.521,-1.41 0.761,-2.318c0.333,-1.265 0.648,-2.547 0.964,-3.829c0.146,-0.592 0.291,-1.184 0.438,-1.773c0.281,-1.125 0.812,-1.774 1.62,-1.983c0.111,-0.028 0.229,0.04 0.259,0.153c0.029,0.114 -0.039,0.229 -0.153,0.259c-0.652,0.168 -1.069,0.7 -1.313,1.674c-0.147,0.589 -0.293,1.181 -0.438,1.772c-0.316,1.284 -0.633,2.568 -0.966,3.836c-0.245,0.928 -0.5,1.704 -0.779,2.374c-0.487,1.17 -1.097,1.32 -1.426,1.302c-0.59,-0.03 -1.114,-0.622 -1.402,-1.584c-0.281,-0.941 -0.531,-1.936 -0.773,-2.896c-0.14,-0.558 -0.28,-1.115 -0.427,-1.666l-0.178,-0.673c-0.225,-0.861 -0.458,-1.751 -0.731,-2.57c-0.323,-0.966 -0.772,-1.541 -1.201,-1.541c-0.001,0 -0.002,0 -0.004,0c-0.425,0.003 -0.86,0.581 -1.164,1.544c-0.331,1.052 -0.605,2.196 -0.87,3.303c-0.131,0.546 -0.262,1.092 -0.399,1.63l-0.124,0.486c-0.158,0.623 -0.32,1.268 -0.512,1.871C8.367,17.32 7.706,17.689 7.242,17.689z"
|
||||
android:fillColor="@color/inrange"/>
|
||||
android:fillColor="@color/inRange"/>
|
||||
<path
|
||||
android:pathData="M21.563,12.709H2.424c-0.392,0 -0.708,-0.317 -0.708,-0.709s0.317,-0.708 0.708,-0.708h19.139c0.392,0 0.709,0.317 0.709,0.708S21.954,12.709 21.563,12.709z"
|
||||
android:fillColor="@color/tempTargetConfirmation"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M7.242,17.689c-0.005,0 -0.011,0 -0.017,0c-0.695,-0.013 -1.318,-0.829 -1.709,-2.24c-0.285,-1.029 -0.542,-2.103 -0.792,-3.141c-0.156,-0.65 -0.313,-1.301 -0.476,-1.945L4.14,9.929c-0.369,-1.486 -0.75,-3.024 -1.746,-3.197c-0.116,-0.02 -0.193,-0.13 -0.173,-0.246s0.129,-0.189 0.246,-0.173C3.735,6.534 4.15,8.208 4.552,9.827l0.108,0.432c0.164,0.646 0.321,1.298 0.478,1.951c0.249,1.035 0.506,2.104 0.789,3.127c0.322,1.163 0.834,1.92 1.307,1.929c0.002,0 0.005,0 0.008,0c0.443,0 0.905,-0.656 1.269,-1.804c0.188,-0.592 0.349,-1.229 0.504,-1.847l0.124,-0.487c0.138,-0.536 0.268,-1.08 0.398,-1.624c0.267,-1.114 0.542,-2.265 0.878,-3.332c0.373,-1.182 0.928,-1.836 1.565,-1.842c0.003,0 0.005,0 0.008,0c0.639,0 1.208,0.65 1.603,1.832c0.278,0.833 0.514,1.729 0.74,2.598l0.177,0.671c0.147,0.553 0.288,1.112 0.43,1.672c0.24,0.956 0.489,1.945 0.769,2.879c0.229,0.77 0.619,1.26 1.017,1.28c0.356,0.043 0.729,-0.362 1.011,-1.041c0.271,-0.651 0.521,-1.41 0.761,-2.318c0.333,-1.265 0.648,-2.547 0.964,-3.829c0.146,-0.592 0.291,-1.184 0.438,-1.773c0.281,-1.125 0.812,-1.774 1.62,-1.983c0.111,-0.028 0.229,0.04 0.259,0.153c0.029,0.114 -0.039,0.229 -0.153,0.259c-0.652,0.168 -1.069,0.7 -1.313,1.674c-0.147,0.589 -0.293,1.181 -0.438,1.772c-0.316,1.284 -0.633,2.568 -0.966,3.836c-0.245,0.928 -0.5,1.704 -0.779,2.374c-0.487,1.17 -1.097,1.32 -1.426,1.302c-0.59,-0.03 -1.114,-0.622 -1.402,-1.584c-0.281,-0.941 -0.531,-1.936 -0.773,-2.896c-0.14,-0.558 -0.28,-1.115 -0.427,-1.666l-0.178,-0.673c-0.225,-0.861 -0.458,-1.751 -0.731,-2.57c-0.323,-0.966 -0.772,-1.541 -1.201,-1.541c-0.001,0 -0.002,0 -0.004,0c-0.425,0.003 -0.86,0.581 -1.164,1.544c-0.331,1.052 -0.605,2.196 -0.87,3.303c-0.131,0.546 -0.262,1.092 -0.399,1.63l-0.124,0.486c-0.158,0.623 -0.32,1.268 -0.512,1.871C8.367,17.32 7.706,17.689 7.242,17.689z"
|
||||
android:fillColor="@color/inrange"/>
|
||||
android:fillColor="@color/inRange"/>
|
||||
<path
|
||||
android:pathData="M16.797,16.24H7.212c-0.391,0 -0.708,-0.317 -0.708,-0.709l0,-2.822H2.424c-0.392,0 -0.708,-0.317 -0.708,-0.709s0.317,-0.708 0.708,-0.708h4.788c0.391,0 0.708,0.317 0.708,0.708l0,2.822h8.167V12c0,-0.392 0.317,-0.708 0.709,-0.708h4.766c0.392,0 0.709,0.317 0.709,0.708s-0.317,0.709 -0.709,0.709h-4.057v2.822C17.506,15.923 17.188,16.24 16.797,16.24z"
|
||||
android:fillColor="@color/tempTargetConfirmation"/>
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="@color/defaulttext" android:pathData="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" />
|
||||
<path android:fillColor="@color/defaultText" android:pathData="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" />
|
||||
</vector>
|
|
@ -4,7 +4,8 @@
|
|||
android:viewportHeight="24"
|
||||
android:viewportWidth="24"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#008585" android:pathData="M19.375,17.01V10h-2v7.01h-3l4,3.99l4,-3.99H19.375zM12.375,3l-4,3.99h3V14h2V6.99h3L12.375,3z"/>
|
||||
<path android:fillColor="#008585" android:pathData="M2.756,15.271c-0.128,0 -0.256,-0.049 -0.354,-0.146c-0.195,-0.195 -0.195,-0.512 0,-0.707l5.514,-5.515c0.196,-0.195 0.512,-0.196 0.708,0c0.195,0.195 0.195,0.512 0,0.708L3.11,15.124C3.012,15.222 2.884,15.271 2.756,15.271z"/>
|
||||
<path android:fillColor="#008585" android:pathData="M8.271,15.271c-0.128,0 -0.256,-0.049 -0.354,-0.146L2.403,9.61c-0.196,-0.196 -0.196,-0.512 0,-0.708c0.195,-0.196 0.512,-0.196 0.708,0l5.514,5.515c0.196,0.195 0.196,0.512 0,0.707C8.527,15.222 8.399,15.271 8.271,15.271z"/>
|
||||
<path android:fillColor="?attr/sensColor"
|
||||
android:pathData="M19.375,17.01V10h-2v7.01h-3l4,3.99l4,-3.99H19.375zM12.375,3l-4,3.99h3V14h2V6.99h3L12.375,3z"/>
|
||||
<path android:fillColor="?attr/sensColor" android:pathData="M2.756,15.271c-0.128,0 -0.256,-0.049 -0.354,-0.146c-0.195,-0.195 -0.195,-0.512 0,-0.707l5.514,-5.515c0.196,-0.195 0.512,-0.196 0.708,0c0.195,0.195 0.195,0.512 0,0.708L3.11,15.124C3.012,15.222 2.884,15.271 2.756,15.271z"/>
|
||||
<path android:fillColor="?attr/sensColor" android:pathData="M8.271,15.271c-0.128,0 -0.256,-0.049 -0.354,-0.146L2.403,9.61c-0.196,-0.196 -0.196,-0.512 0,-0.708c0.195,-0.196 0.512,-0.196 0.708,0l5.514,5.515c0.196,0.195 0.196,0.512 0,0.707C8.527,15.222 8.399,15.271 8.271,15.271z"/>
|
||||
</vector>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/fragmentbackground"
|
||||
tools:context=".plugins.general.actions.ActionsFragment">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -12,28 +12,43 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/actions"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:contentPadding="2dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/actions" />
|
||||
|
||||
<androidx.gridlayout.widget.GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dip"
|
||||
app:columnCount="2">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/profile_switch"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_actions_profileswitch"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/careportal_profileswitch"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="0"
|
||||
|
@ -43,12 +58,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/temp_target"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_temptarget_high"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/careportal_temporarytarget"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="1"
|
||||
|
@ -58,12 +73,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/set_temp_basal"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_actions_starttempbasal"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/overview_tempbasal_button"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="0"
|
||||
|
@ -73,12 +88,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/cancel_temp_basal"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_cancelbasal"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/canceltemp"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone"
|
||||
|
@ -89,12 +104,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/extended_bolus"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_actions_startextbolus"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/overview_extendedbolus_button"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="1"
|
||||
|
@ -104,12 +119,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/extended_bolus_cancel"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_actions_cancelextbolus"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/overview_extendedbolus_cancel_button"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone"
|
||||
|
@ -120,12 +135,21 @@
|
|||
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
|
||||
<TextView
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/careportal_statuslight"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:text="@string/careportal" />
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:contentPadding="2dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<include
|
||||
android:id="@+id/status"
|
||||
|
@ -134,20 +158,44 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/careportal_statuslightbutton"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:contentPadding="2dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:text="@string/careportal" />
|
||||
|
||||
<androidx.gridlayout.widget.GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dip"
|
||||
app:columnCount="2">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/bg_check"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:drawableTop="@drawable/ic_cp_bgcheck"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/careportal_bgcheck"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="0"
|
||||
|
@ -157,12 +205,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/fill"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_cp_pump_canula"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/primefill"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="1"
|
||||
|
@ -172,12 +220,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/cgm_sensor_insert"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:drawableTop="@drawable/ic_cp_cgm_insert"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/careportal_cgmsensorinsert"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="0"
|
||||
|
@ -187,12 +235,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/pump_battery_change"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:drawableTop="@drawable/ic_cp_pump_battery"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/careportal_pumpbatterychange"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="1"
|
||||
|
@ -202,12 +250,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/note"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:drawableTop="@drawable/ic_cp_note"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/careportal_note"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="0"
|
||||
|
@ -217,12 +265,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/exercise"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:drawableTop="@drawable/ic_cp_exercise"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/careportal_exercise"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="1"
|
||||
|
@ -232,12 +280,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/announcement"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:drawableTop="@drawable/ic_cp_announcement"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/careportal_announcement"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="0"
|
||||
|
@ -247,12 +295,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/question"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:drawableTop="@drawable/ic_cp_question"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/careportal_question"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="1"
|
||||
|
@ -262,6 +310,23 @@
|
|||
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/careportal_tools"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:contentPadding="2dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -272,17 +337,18 @@
|
|||
<androidx.gridlayout.widget.GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dip"
|
||||
app:columnCount="2">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/history_browser"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_pump_history"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/nav_historybrowser"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="0"
|
||||
|
@ -292,12 +358,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/tdd_stats"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_cp_stats"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/tdd"
|
||||
android:textSize="11sp"
|
||||
app:layout_column="1"
|
||||
|
@ -307,6 +373,8 @@
|
|||
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
|
@ -59,7 +59,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="24" />
|
||||
tools:text="24" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -111,5 +111,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/nav_logsettings"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/defaultbackground"
|
||||
android:background="?attr/defaultBackground"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
|
@ -25,10 +25,9 @@
|
|||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:text="1"
|
||||
tools:ignore="HardcodedText" />
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="Profile 1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/menu2"
|
||||
|
@ -36,10 +35,9 @@
|
|||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:text="2"
|
||||
tools:ignore="HardcodedText" />
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="Profile 2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -178,7 +176,7 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/copy_to_local_profile"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/ic_clone_48"
|
||||
|
@ -257,7 +255,7 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/compare_profiles"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/ic_compare_profiles"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
android:layout_marginTop="16dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:importantForAccessibility="no"
|
||||
android:onClick="exitPressed"
|
||||
app:srcCompat="@drawable/ic_exit_to_app" />
|
||||
|
||||
|
@ -64,8 +65,8 @@
|
|||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:background="@color/black_alpha_40"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/previous_button"
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
android:id="@+id/otp_provisioning"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/a11y_otp_qr_code"
|
||||
android:layout_marginTop="10dp"
|
||||
android:scaleType="center" />
|
||||
|
||||
|
@ -72,6 +73,7 @@
|
|||
android:layout_width="140sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/smscommunicator_code_verify_hint"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="number"
|
||||
android:maxLength="12"
|
||||
android:textAlignment="center"
|
||||
|
@ -97,12 +99,12 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/otp_reset"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:text="@string/smscommunicator_otp_reset_btn"
|
||||
android:textColor="?attr/treatmentButton" />
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activities.SurveyActivity">
|
||||
tools:context=".activities.StatsActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -32,8 +32,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/statistics"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -47,6 +47,19 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="5dp" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardview_tdds"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
app:contentPadding="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tdds"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -54,31 +67,62 @@
|
|||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardview_tir"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
app:contentPadding="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tir"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardview_activity"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
app:contentPadding="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/done_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="8dp">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/reset"
|
||||
|
|
|
@ -177,7 +177,6 @@
|
|||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
<?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"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:card_view="http://schemas.android.com/tools"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:id="@+id/bg_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
card_view:cardElevation="0dp"
|
||||
card_view:cardBackgroundColor="?attr/cardItemBackgroundColor"
|
||||
card_view:cardUseCompatPadding="true">
|
||||
android:layout_marginStart="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:contentPadding="2dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -83,4 +88,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -69,9 +69,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_span="5"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
@ -108,11 +108,10 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/insulin_level_label"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -142,9 +141,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_span="5"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
@ -182,8 +181,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -214,9 +213,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_span="5"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
@ -255,8 +254,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -36,8 +36,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="4dp"
|
||||
app:tint="?android:attr/colorAccent"
|
||||
app:srcCompat="@drawable/ic_visibility" />
|
||||
android:importantForAccessibility="no"
|
||||
app:srcCompat="@drawable/ic_visibility"
|
||||
app:tint="?android:attr/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -45,4 +47,5 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
|
@ -38,7 +38,8 @@
|
|||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp" />
|
||||
android:layout_marginEnd="8dp"
|
||||
android:importantForAccessibility="no" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/plugin_icon2"
|
||||
|
@ -46,6 +47,7 @@
|
|||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:importantForAccessibility="no"
|
||||
tools:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -70,6 +72,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
tools:text="A super exquisite plugin description" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -80,6 +83,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:contentDescription="@string/a11y_open_settings"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
app:srcCompat="@drawable/ic_settings" />
|
||||
|
||||
|
@ -88,4 +92,5 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:saveEnabled="false" />
|
||||
|
||||
</LinearLayout>
|
|
@ -31,8 +31,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/overview_calibration"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/carbs"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -75,6 +75,7 @@
|
|||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="5dp">
|
||||
|
||||
<TableRow
|
||||
|
@ -91,12 +92,12 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/time_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:width="120dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/time_offset"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
|
@ -183,8 +184,8 @@
|
|||
android:layout_weight="1"
|
||||
android:padding="10dp"
|
||||
android:width="120dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/treatments_wizard_carbs_label"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
@ -241,7 +242,6 @@
|
|||
android:text="+20"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -256,8 +256,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/bolus_reminder"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
|
@ -267,6 +267,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_access_alarm_24dp" />
|
||||
|
||||
<CheckBox
|
||||
|
@ -276,6 +277,7 @@
|
|||
android:layout_gravity="center_vertical"
|
||||
android:checked="false"
|
||||
android:padding="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/careportal_profileswitch"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/virtualpump_extendedbolus_label"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -73,8 +73,8 @@
|
|||
android:layout_gravity="center_vertical"
|
||||
android:gravity="start"
|
||||
android:minWidth="45dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/insulin_unit_shortname"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
|
@ -108,14 +108,13 @@
|
|||
android:layout_gravity="center_vertical"
|
||||
android:gravity="start"
|
||||
android:minWidth="45dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/unit_minute_short"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/okcancel"
|
||||
layout="@layout/okcancel" />
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/primefill"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -86,8 +86,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="end"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
app:customContentDescription="@string/overview_insulin_label" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/overview_insulin_label"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -145,29 +145,28 @@
|
|||
android:padding="5dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/GrayButton"
|
||||
android:id="@+id/plus05"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="Increment insulin with 0.5"
|
||||
android:text="+0.5" />
|
||||
tools:text="+0.5" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/GrayButton"
|
||||
android:id="@+id/plus10"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="+1.0" />
|
||||
tools:text="+1.0" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/GrayButton"
|
||||
android:id="@+id/plus20"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="+2.0" />
|
||||
tools:text="+2.0" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/loop"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -46,7 +46,6 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="5dp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/overview_loop"
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -58,8 +57,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/loop"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
|
@ -72,82 +71,74 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_closeloop"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:drawableTop="@drawable/ic_loop_closed"
|
||||
android:text="@string/closedloop"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_lgsloop"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:drawableTop="@drawable/ic_loop_lgs"
|
||||
android:text="@string/lowglucosesuspend"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_openloop"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:drawableTop="@drawable/ic_loop_open"
|
||||
android:text="@string/openloop"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_enable"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:drawableTop="@drawable/ic_loop_resume"
|
||||
android:text="@string/enableloop"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_disable"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:drawableTop="@drawable/ic_loop_disabled"
|
||||
android:text="@string/disableloop"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
android:text="@string/disableloop" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -172,26 +163,23 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/suspendloop"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_resume"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_loop_resume"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/resumeloop"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
|
@ -203,61 +191,51 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_suspend_1h"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawableTop="@drawable/ic_loop_paused"
|
||||
android:text="@string/duration1h"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
android:text="@string/duration1h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_suspend_2h"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawableTop="@drawable/ic_loop_paused"
|
||||
android:text="@string/duration2h"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
|
||||
android:text="@string/duration2h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_suspend_3h"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawableTop="@drawable/ic_loop_paused"
|
||||
android:text="@string/duration3h"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
|
||||
android:text="@string/duration3h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_suspend_10h"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawableTop="@drawable/ic_loop_paused"
|
||||
android:text="@string/duration10h"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
android:text="@string/duration10h" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -282,25 +260,23 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/disconnectpump"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_reconnect"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_loop_reconnect"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/reconnect"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
|
@ -312,73 +288,63 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_15m"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawableTop="@drawable/ic_loop_disconnected"
|
||||
android:text="@string/duration15m"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
android:text="@string/duration15m" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_30m"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawableTop="@drawable/ic_loop_disconnected"
|
||||
android:text="@string/duration30m"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
android:text="@string/duration30m" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_1h"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawableTop="@drawable/ic_loop_disconnected"
|
||||
android:text="@string/duration1h"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
android:text="@string/duration1h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_2h"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawableTop="@drawable/ic_loop_disconnected"
|
||||
android:text="@string/duration2h"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
android:text="@string/duration2h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_3h"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:drawableTop="@drawable/ic_loop_disconnected"
|
||||
android:text="@string/duration3h"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="11sp" />
|
||||
android:text="@string/duration3h" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -396,7 +362,7 @@
|
|||
android:id="@+id/cancel"
|
||||
style="@style/OkCancelButton.Text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/cancel"
|
||||
|
@ -404,4 +370,5 @@
|
|||
android:textAlignment="textEnd" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
|
@ -30,8 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/careportal_profileswitch"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -61,7 +61,6 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/reuselayout"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -72,7 +71,7 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/reusebutton"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:drawablePadding="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -92,8 +91,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:width="120dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/careportal_newnstreatment_duration_label"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
@ -129,8 +128,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:width="120dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/careportal_newnstreatment_percentage_label"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
@ -151,7 +150,8 @@
|
|||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="%"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -166,8 +166,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:width="120dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/careportal_newnstreatment_timeshift_label"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
@ -202,15 +202,15 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:width="120dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/careportal_temporarytarget"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/tt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
|
@ -233,4 +233,3 @@
|
|||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/tempbasal_label"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -77,7 +77,8 @@
|
|||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="%"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/careportal_temporarytarget"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -140,62 +140,54 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/target_cancel"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_target_cancel"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/cancel"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?attr/tempTargetConfirmation"
|
||||
android:textSize="11sp" />
|
||||
android:textColor="?attr/tempTargetConfirmation" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/eating_soon"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_target_eatingsoon"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/eatingsoon"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?attr/carbsColor"
|
||||
android:textSize="11sp" />
|
||||
android:textColor="?attr/carbsColor" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/activity"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_target_activity"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/activity"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?attr/exerciseColor"
|
||||
android:textSize="11sp" />
|
||||
android:textColor="?attr/exerciseColor" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/hypo"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_target_hypo"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/hypo"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?attr/lowColor"
|
||||
android:textSize="11sp" />
|
||||
android:textColor="?attr/lowColor" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/overview_treatment_label"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/boluswizard"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
@ -48,8 +48,8 @@
|
|||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingEnd="5dp"
|
||||
tools:ignore="RtlSymmetry">
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="5dp">
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
|
@ -149,7 +149,8 @@
|
|||
android:padding="2dp"
|
||||
android:text="%"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -191,8 +192,8 @@
|
|||
android:id="@+id/total"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="2.35U 28g"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
@ -202,8 +203,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="50%"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?attr/bolusColor"
|
||||
|
@ -347,7 +348,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:checked="false"
|
||||
android:contentDescription="set carb timer alarm"
|
||||
android:contentDescription="@string/a11y_set_carb_timer"
|
||||
android:drawableEnd="@drawable/ic_access_alarm_24dp"
|
||||
android:layoutDirection="rtl"
|
||||
android:padding="2dp" />
|
||||
|
@ -384,7 +385,8 @@
|
|||
android:layout_marginEnd="5dp"
|
||||
android:layout_weight="0.5"
|
||||
android:hint="@string/profile"
|
||||
android:paddingStart="7dp">
|
||||
android:paddingStart="7dp"
|
||||
android:paddingEnd="0dp">
|
||||
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
android:id="@+id/profileList"
|
||||
|
@ -474,7 +476,6 @@
|
|||
android:checked="false"
|
||||
android:text="@string/bg_trend_label" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bg_trend"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/wear_wizard_settings"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/refresh_from_nightscout"
|
||||
style="?android:attr/buttonStyle"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
@ -72,7 +72,6 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
<?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"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
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.CardView"
|
||||
android:id="@+id/food_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
card_view:cardBackgroundColor="?attr/cardItemBackgroundColor">
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:strokeWidth="1dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:contentPadding="2dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/food_item"
|
||||
|
@ -18,8 +28,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp">
|
||||
android:paddingStart="3dp"
|
||||
android:paddingEnd="3dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/name_and_info_container"
|
||||
|
@ -55,7 +65,7 @@
|
|||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginLeft="5dp">
|
||||
android:layout_marginStart="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/carbs"
|
||||
|
@ -127,7 +137,6 @@
|
|||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
|
@ -137,4 +146,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp">
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/details_webview"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:srcCompat="@drawable/ic_meta_format"
|
||||
android:tint="#ffffff" />
|
||||
|
|
|
@ -296,11 +296,11 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/activate_profile"
|
||||
app:icon="@drawable/ic_local_activate"
|
||||
app:iconTint="@color/ic_local_activate" />
|
||||
|
@ -317,11 +317,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="1dp"
|
||||
android:paddingRight="1dp"
|
||||
android:paddingStart="1dp"
|
||||
android:paddingEnd="1dp"
|
||||
android:text="@string/reset"
|
||||
app:icon="@drawable/ic_local_reset"
|
||||
app:iconTint="@color/ic_local_reset" />
|
||||
|
@ -332,11 +332,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="1dp"
|
||||
android:paddingRight="1dp"
|
||||
android:paddingStart="1dp"
|
||||
android:paddingEnd="1dp"
|
||||
android:text="@string/save"
|
||||
app:icon="@drawable/ic_local_save"
|
||||
app:iconTint="@color/ic_local_save" />
|
||||
|
@ -347,5 +347,3 @@
|
|||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
android:textSize="12sp"
|
||||
tools:text="TYPE" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/logsettings_visibility"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -56,9 +56,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -102,9 +102,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -147,9 +147,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -192,9 +192,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -237,9 +237,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -282,9 +282,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -327,9 +327,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -372,9 +372,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -417,9 +417,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -462,9 +462,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
@ -507,9 +507,9 @@
|
|||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?android:attr/dividerHorizontal" />
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
style="@style/GrayButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/nav_logsettings"
|
||||
|
@ -37,9 +37,9 @@
|
|||
style="@style/GrayButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/send_all_logs"
|
||||
|
@ -50,9 +50,9 @@
|
|||
style="@style/GrayButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/delete_logs"
|
||||
|
@ -63,9 +63,9 @@
|
|||
style="@style/GrayButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/nav_export"
|
||||
|
@ -76,23 +76,22 @@
|
|||
style="@style/GrayButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/nav_import"
|
||||
android:textColor="?attr/treatmentButton" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/export_csv"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/ue_export_to_csv"
|
||||
|
@ -103,9 +102,9 @@
|
|||
style="@style/GrayButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/nav_resetdb"
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
@ -23,7 +23,7 @@
|
|||
android:id="@+id/url"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:autoLink="web"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
|
@ -32,8 +32,8 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
@ -48,8 +48,8 @@
|
|||
android:id="@+id/autoscroll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/nsclientinternal_autoscroll"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
|
@ -58,14 +58,14 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:text="@string/status"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
|
@ -90,17 +90,17 @@
|
|||
android:id="@+id/queue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp" />
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
@ -150,8 +150,8 @@
|
|||
android:id="@+id/log_scrollview"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp">
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/log"
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
<?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_total"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/increment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/ic_plus" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/display"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/border_gray"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:textColor="?attr/numPickerText"
|
||||
tools:text="1" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/decrement"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/ic_minus" />
|
||||
|
||||
</LinearLayout>
|
|
@ -28,7 +28,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="?attr/objectivesBackgroundColor"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@+id/exam_options"
|
||||
tools:layout_editor_absoluteX="3dp" />
|
||||
|
@ -51,7 +50,7 @@
|
|||
android:text="@string/reset" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="" />
|
||||
|
@ -77,10 +76,10 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="Question"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/exam_name" />
|
||||
app:layout_constraintTop_toBottomOf="@id/exam_name"
|
||||
tools:text="Question" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exam_hint"
|
||||
|
@ -95,22 +94,22 @@
|
|||
android:id="@+id/exam_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exam_disabledto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Disabled until:"
|
||||
android:textColor="?attr/objectivesDisabledTextColor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/exam_hints" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/exam_hints"
|
||||
tools:text="Disabled until:" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/navigation"
|
||||
|
@ -131,7 +130,7 @@
|
|||
android:text="@string/previous_button" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="" />
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue