Merge branch 'dev' into wear
This commit is contained in:
commit
78ac6e1a38
12 changed files with 285 additions and 273 deletions
|
@ -1,15 +1,12 @@
|
||||||
package info.nightscout.androidaps.plugins.aps.loop
|
package info.nightscout.androidaps.plugins.aps.loop
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.*
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.databinding.LoopFragmentBinding
|
import info.nightscout.androidaps.databinding.LoopFragmentBinding
|
||||||
import info.nightscout.androidaps.interfaces.Constraint
|
import info.nightscout.androidaps.interfaces.Constraint
|
||||||
import info.nightscout.androidaps.interfaces.Loop
|
import info.nightscout.androidaps.interfaces.Loop
|
||||||
import info.nightscout.shared.logging.AAPSLogger
|
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui
|
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui
|
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||||
|
@ -18,6 +15,7 @@ import info.nightscout.androidaps.utils.FabricPrivacy
|
||||||
import info.nightscout.androidaps.utils.HtmlHelper
|
import info.nightscout.androidaps.utils.HtmlHelper
|
||||||
import info.nightscout.androidaps.interfaces.ResourceHelper
|
import info.nightscout.androidaps.interfaces.ResourceHelper
|
||||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||||
|
import info.nightscout.shared.logging.AAPSLogger
|
||||||
import info.nightscout.shared.sharedPreferences.SP
|
import info.nightscout.shared.sharedPreferences.SP
|
||||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||||
|
@ -34,6 +32,8 @@ class LoopFragment : DaggerFragment() {
|
||||||
@Inject lateinit var loop: Loop
|
@Inject lateinit var loop: Loop
|
||||||
@Inject lateinit var dateUtil: DateUtil
|
@Inject lateinit var dateUtil: DateUtil
|
||||||
|
|
||||||
|
private val ID_MENU_RUN = 1
|
||||||
|
|
||||||
private var disposable: CompositeDisposable = CompositeDisposable()
|
private var disposable: CompositeDisposable = CompositeDisposable()
|
||||||
|
|
||||||
private var _binding: LoopFragmentBinding? = null
|
private var _binding: LoopFragmentBinding? = null
|
||||||
|
@ -42,8 +42,11 @@ class LoopFragment : DaggerFragment() {
|
||||||
// onDestroyView.
|
// onDestroyView.
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
override fun onCreateView(
|
||||||
savedInstanceState: Bundle?): View {
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
setHasOptionsMenu(true)
|
||||||
_binding = LoopFragmentBinding.inflate(inflater, container, false)
|
_binding = LoopFragmentBinding.inflate(inflater, container, false)
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
@ -51,11 +54,32 @@ class LoopFragment : DaggerFragment() {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
binding.run.setOnClickListener {
|
with(binding.swipeRefresh) {
|
||||||
binding.lastrun.text = rh.gs(R.string.executing)
|
setColorSchemeColors(rh.gac(context, R.attr.colorPrimaryDark), rh.gac(context, R.attr.colorPrimary), rh.gac(context, R.attr.colorSecondary))
|
||||||
Thread { loop.invoke("Loop button", true) }.start()
|
setOnRefreshListener {
|
||||||
|
binding.lastrun.text = rh.gs(info.nightscout.androidaps.R.string.executing)
|
||||||
|
Thread { loop.invoke("Loop swiperefresh", true) }.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||||
|
super.onCreateOptionsMenu(menu, inflater)
|
||||||
|
menu.removeItem(ID_MENU_RUN)
|
||||||
|
menu.add(Menu.FIRST, ID_MENU_RUN, 0, rh.gs(R.string.openapsma_run)).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER)
|
||||||
|
menu.setGroupDividerEnabled(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onOptionsItemSelected(item: MenuItem): Boolean =
|
||||||
|
when (item.itemId) {
|
||||||
|
ID_MENU_RUN -> {
|
||||||
|
binding.lastrun.text = rh.gs(R.string.executing)
|
||||||
|
Thread { loop.invoke("Loop menu", true) }.start()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
@ -117,6 +141,7 @@ class LoopFragment : DaggerFragment() {
|
||||||
allConstraints.getMostLimitedReasons(aapsLogger)
|
allConstraints.getMostLimitedReasons(aapsLogger)
|
||||||
} ?: ""
|
} ?: ""
|
||||||
binding.constraints.text = constraints
|
binding.constraints.text = constraints
|
||||||
|
binding.swipeRefresh.isRefreshing = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,5 +158,6 @@ class LoopFragment : DaggerFragment() {
|
||||||
binding.tbrexecutionTime.text = ""
|
binding.tbrexecutionTime.text = ""
|
||||||
binding.tbrsetbypump.text = ""
|
binding.tbrsetbypump.text = ""
|
||||||
binding.smbsetbypump.text = ""
|
binding.smbsetbypump.text = ""
|
||||||
|
binding.swipeRefresh.isRefreshing = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,10 @@ package info.nightscout.androidaps.plugins.aps.openAPSAMA
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.view.LayoutInflater
|
import android.view.*
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.databinding.OpenapsamaFragmentBinding
|
import info.nightscout.androidaps.databinding.OpenapsamaFragmentBinding
|
||||||
import info.nightscout.shared.logging.AAPSLogger
|
|
||||||
import info.nightscout.shared.logging.LTag
|
|
||||||
import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateGui
|
import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateGui
|
||||||
import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateResultGui
|
import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateResultGui
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||||
|
@ -18,6 +14,8 @@ import info.nightscout.androidaps.utils.FabricPrivacy
|
||||||
import info.nightscout.androidaps.utils.JSONFormatter
|
import info.nightscout.androidaps.utils.JSONFormatter
|
||||||
import info.nightscout.androidaps.interfaces.ResourceHelper
|
import info.nightscout.androidaps.interfaces.ResourceHelper
|
||||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||||
|
import info.nightscout.shared.logging.AAPSLogger
|
||||||
|
import info.nightscout.shared.logging.LTag
|
||||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||||
import org.json.JSONArray
|
import org.json.JSONArray
|
||||||
|
@ -37,14 +35,19 @@ class OpenAPSAMAFragment : DaggerFragment() {
|
||||||
@Inject lateinit var dateUtil: DateUtil
|
@Inject lateinit var dateUtil: DateUtil
|
||||||
@Inject lateinit var jsonFormatter: JSONFormatter
|
@Inject lateinit var jsonFormatter: JSONFormatter
|
||||||
|
|
||||||
|
private val ID_MENU_RUN = 1
|
||||||
|
|
||||||
private var _binding: OpenapsamaFragmentBinding? = null
|
private var _binding: OpenapsamaFragmentBinding? = null
|
||||||
|
|
||||||
// This property is only valid between onCreateView and
|
// This property is only valid between onCreateView and
|
||||||
// onDestroyView.
|
// onDestroyView.
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
override fun onCreateView(
|
||||||
savedInstanceState: Bundle?): View {
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
setHasOptionsMenu(true)
|
||||||
_binding = OpenapsamaFragmentBinding.inflate(inflater, container, false)
|
_binding = OpenapsamaFragmentBinding.inflate(inflater, container, false)
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
@ -52,11 +55,34 @@ class OpenAPSAMAFragment : DaggerFragment() {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
binding.run.setOnClickListener {
|
with(binding.swipeRefresh) {
|
||||||
openAPSAMAPlugin.invoke("OpenAPSAMA button", false)
|
setColorSchemeColors(rh.gac(context, R.attr.colorPrimaryDark), rh.gac(context, R.attr.colorPrimary), rh.gac(context, R.attr.colorSecondary))
|
||||||
|
setOnRefreshListener {
|
||||||
|
binding.lastrun.text = rh.gs(info.nightscout.androidaps.R.string.executing)
|
||||||
|
openAPSAMAPlugin.invoke("OpenAPSAMA swiperefresh", false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||||
|
super.onCreateOptionsMenu(menu, inflater)
|
||||||
|
menu.removeItem(ID_MENU_RUN)
|
||||||
|
menu.add(Menu.FIRST, ID_MENU_RUN, 0, rh.gs(R.string.openapsma_run)).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER)
|
||||||
|
menu.setGroupDividerEnabled(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onOptionsItemSelected(item: MenuItem): Boolean =
|
||||||
|
when (item.itemId) {
|
||||||
|
ID_MENU_RUN -> {
|
||||||
|
binding.lastrun.text = rh.gs(R.string.executing)
|
||||||
|
openAPSAMAPlugin.invoke("OpenAPSAMA menu", false)
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
@ -118,6 +144,7 @@ class OpenAPSAMAFragment : DaggerFragment() {
|
||||||
openAPSAMAPlugin.lastAutosensResult.let {
|
openAPSAMAPlugin.lastAutosensResult.let {
|
||||||
binding.autosensdata.text = jsonFormatter.format(it.json())
|
binding.autosensdata.text = jsonFormatter.format(it.json())
|
||||||
}
|
}
|
||||||
|
binding.swipeRefresh.isRefreshing = false
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateResultGUI(text: String) {
|
private fun updateResultGUI(text: String) {
|
||||||
|
@ -131,5 +158,6 @@ class OpenAPSAMAFragment : DaggerFragment() {
|
||||||
binding.scriptdebugdata.text = ""
|
binding.scriptdebugdata.text = ""
|
||||||
binding.request.text = ""
|
binding.request.text = ""
|
||||||
binding.lastrun.text = ""
|
binding.lastrun.text = ""
|
||||||
|
binding.swipeRefresh.isRefreshing = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,7 @@ package info.nightscout.androidaps.plugins.aps.openAPSSMB
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.view.LayoutInflater
|
import android.view.*
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.databinding.OpenapsamaFragmentBinding
|
import info.nightscout.androidaps.databinding.OpenapsamaFragmentBinding
|
||||||
|
@ -39,6 +37,8 @@ class OpenAPSSMBFragment : DaggerFragment() {
|
||||||
@Inject lateinit var dateUtil: DateUtil
|
@Inject lateinit var dateUtil: DateUtil
|
||||||
@Inject lateinit var jsonFormatter: JSONFormatter
|
@Inject lateinit var jsonFormatter: JSONFormatter
|
||||||
|
|
||||||
|
private val ID_MENU_RUN = 1
|
||||||
|
|
||||||
private var _binding: OpenapsamaFragmentBinding? = null
|
private var _binding: OpenapsamaFragmentBinding? = null
|
||||||
|
|
||||||
// This property is only valid between onCreateView and
|
// This property is only valid between onCreateView and
|
||||||
|
@ -46,6 +46,7 @@ class OpenAPSSMBFragment : DaggerFragment() {
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||||
|
setHasOptionsMenu(true)
|
||||||
_binding = OpenapsamaFragmentBinding.inflate(inflater, container, false)
|
_binding = OpenapsamaFragmentBinding.inflate(inflater, container, false)
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
@ -53,11 +54,34 @@ class OpenAPSSMBFragment : DaggerFragment() {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
binding.run.setOnClickListener {
|
with(binding.swipeRefresh) {
|
||||||
activePlugin.activeAPS.invoke("OpenAPSSMB button", false)
|
setColorSchemeColors(rh.gac(context, R.attr.colorPrimaryDark), rh.gac(context, R.attr.colorPrimary), rh.gac(context, R.attr.colorSecondary))
|
||||||
|
setOnRefreshListener {
|
||||||
|
binding.lastrun.text = rh.gs(info.nightscout.androidaps.R.string.executing)
|
||||||
|
activePlugin.activeAPS.invoke("OpenAPSSMB swiperefresh", false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||||
|
super.onCreateOptionsMenu(menu, inflater)
|
||||||
|
menu.removeItem(ID_MENU_RUN)
|
||||||
|
menu.add(Menu.FIRST, ID_MENU_RUN, 0, rh.gs(R.string.openapsma_run)).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER)
|
||||||
|
menu.setGroupDividerEnabled(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onOptionsItemSelected(item: MenuItem): Boolean =
|
||||||
|
when (item.itemId) {
|
||||||
|
ID_MENU_RUN -> {
|
||||||
|
binding.lastrun.text = rh.gs(R.string.executing)
|
||||||
|
activePlugin.activeAPS.invoke("OpenAPSSMB menu", false)
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
@ -122,6 +146,7 @@ class OpenAPSSMBFragment : DaggerFragment() {
|
||||||
openAPSSMBPlugin.lastAutosensResult.let {
|
openAPSSMBPlugin.lastAutosensResult.let {
|
||||||
binding.autosensdata.text = jsonFormatter.format(it.json())
|
binding.autosensdata.text = jsonFormatter.format(it.json())
|
||||||
}
|
}
|
||||||
|
binding.swipeRefresh.isRefreshing = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
|
@ -137,5 +162,6 @@ class OpenAPSSMBFragment : DaggerFragment() {
|
||||||
binding.scriptdebugdata.text = ""
|
binding.scriptdebugdata.text = ""
|
||||||
binding.request.text = ""
|
binding.request.text = ""
|
||||||
binding.lastrun.text = ""
|
binding.lastrun.text = ""
|
||||||
|
binding.swipeRefresh.isRefreshing = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.Food
|
import info.nightscout.androidaps.database.entities.Food
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
import info.nightscout.androidaps.database.entities.ValueWithUnit
|
|
||||||
import info.nightscout.androidaps.database.transactions.InvalidateFoodTransaction
|
import info.nightscout.androidaps.database.transactions.InvalidateFoodTransaction
|
||||||
import info.nightscout.androidaps.databinding.FoodFragmentBinding
|
import info.nightscout.androidaps.databinding.FoodFragmentBinding
|
||||||
import info.nightscout.androidaps.databinding.FoodItemBinding
|
import info.nightscout.androidaps.databinding.FoodItemBinding
|
||||||
|
@ -26,7 +25,6 @@ import info.nightscout.androidaps.events.EventFoodDatabaseChanged
|
||||||
import info.nightscout.androidaps.extensions.toVisibility
|
import info.nightscout.androidaps.extensions.toVisibility
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientRestart
|
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||||
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
|
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
|
@ -35,10 +33,8 @@ import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||||
import info.nightscout.androidaps.utils.ui.UIRunnable
|
import info.nightscout.androidaps.utils.ui.UIRunnable
|
||||||
import info.nightscout.shared.logging.AAPSLogger
|
import info.nightscout.shared.logging.AAPSLogger
|
||||||
import info.nightscout.shared.logging.LTag
|
import info.nightscout.shared.logging.LTag
|
||||||
import io.reactivex.rxjava3.core.Completable
|
|
||||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||||
import io.reactivex.rxjava3.kotlin.subscribeBy
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
@ -73,27 +69,7 @@ class FoodFragment : DaggerFragment() {
|
||||||
binding.recyclerview.setHasFixedSize(true)
|
binding.recyclerview.setHasFixedSize(true)
|
||||||
binding.recyclerview.layoutManager = LinearLayoutManager(view.context)
|
binding.recyclerview.layoutManager = LinearLayoutManager(view.context)
|
||||||
|
|
||||||
binding.refreshFromNightscout.setOnClickListener {
|
binding.filterInputLayout.setEndIconOnClickListener {
|
||||||
context?.let { context ->
|
|
||||||
OKDialog.showConfirmation(context, rh.gs(R.string.refresheventsfromnightscout) + " ?", {
|
|
||||||
uel.log(
|
|
||||||
Action.FOOD, Sources.Food, rh.gs(R.string.refresheventsfromnightscout),
|
|
||||||
ValueWithUnit.SimpleString(rh.gsNotLocalised(R.string.refresheventsfromnightscout))
|
|
||||||
)
|
|
||||||
disposable += Completable.fromAction { repository.deleteAllFoods() }
|
|
||||||
.subscribeOn(aapsSchedulers.io)
|
|
||||||
.observeOn(aapsSchedulers.main)
|
|
||||||
.subscribeBy(
|
|
||||||
onError = { aapsLogger.error("Error removing foods", it) },
|
|
||||||
onComplete = { rxBus.send(EventFoodDatabaseChanged()) }
|
|
||||||
)
|
|
||||||
|
|
||||||
rxBus.send(EventNSClientRestart())
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.filterinputLayout.setEndIconOnClickListener {
|
|
||||||
binding.filter.setText("")
|
binding.filter.setText("")
|
||||||
binding.categoryList.setText(rh.gs(R.string.none), false)
|
binding.categoryList.setText(rh.gs(R.string.none), false)
|
||||||
binding.subcategoryList.setText(rh.gs(R.string.none), false)
|
binding.subcategoryList.setText(rh.gs(R.string.none), false)
|
||||||
|
@ -220,7 +196,6 @@ class FoodFragment : DaggerFragment() {
|
||||||
holder.binding.energy.text = rh.gs(R.string.shortenergy) + ": " + food.energy + rh.gs(R.string.shortkilojoul)
|
holder.binding.energy.text = rh.gs(R.string.shortenergy) + ": " + food.energy + rh.gs(R.string.shortkilojoul)
|
||||||
holder.binding.energy.visibility = food.energy.isNotZero().toVisibility()
|
holder.binding.energy.visibility = food.energy.isNotZero().toVisibility()
|
||||||
holder.binding.icRemove.tag = food
|
holder.binding.icRemove.tag = food
|
||||||
holder.binding.foodItem.tag = food
|
|
||||||
holder.binding.icCalculator.tag = food
|
holder.binding.icCalculator.tag = food
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,11 @@ import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||||
import info.nightscout.androidaps.interfaces.Config
|
import info.nightscout.androidaps.interfaces.Config
|
||||||
import info.nightscout.androidaps.interfaces.Loop
|
import info.nightscout.androidaps.interfaces.Loop
|
||||||
import info.nightscout.shared.logging.AAPSLogger
|
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||||
|
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||||
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
|
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
|
||||||
import info.nightscout.androidaps.interfaces.ResourceHelper
|
import info.nightscout.androidaps.interfaces.ResourceHelper
|
||||||
|
import info.nightscout.shared.logging.AAPSLogger
|
||||||
import info.nightscout.shared.sharedPreferences.SP
|
import info.nightscout.shared.sharedPreferences.SP
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
|
@ -31,8 +32,10 @@ class OverviewMenus @Inject constructor(
|
||||||
private val rxBus: RxBus,
|
private val rxBus: RxBus,
|
||||||
private val buildHelper: BuildHelper,
|
private val buildHelper: BuildHelper,
|
||||||
private val loop: Loop,
|
private val loop: Loop,
|
||||||
private val config: Config
|
private val config: Config,
|
||||||
|
private val fabricPrivacy: FabricPrivacy
|
||||||
) {
|
) {
|
||||||
|
|
||||||
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) {
|
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),
|
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),
|
TREAT(R.string.overview_show_treatments, R.attr.predictionColor, R.attr.menuTextColor, primary = true, secondary = false, shortnameId = R.string.treatments_shortname),
|
||||||
|
@ -138,22 +141,28 @@ class OverviewMenus @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
popup.setOnMenuItemClickListener {
|
popup.setOnMenuItemClickListener {
|
||||||
|
try {
|
||||||
// id < 100 graph header - divider 1, 2, 3 .....
|
// id < 100 graph header - divider 1, 2, 3 .....
|
||||||
when {
|
when {
|
||||||
it.itemId == numOfGraphs -> {
|
it.itemId == numOfGraphs -> {
|
||||||
// add new empty
|
// add new empty
|
||||||
_setting.add(Array(CharType.values().size) { false })
|
_setting.add(Array(CharType.values().size) { false })
|
||||||
}
|
}
|
||||||
|
|
||||||
it.itemId < 100 -> {
|
it.itemId < 100 -> {
|
||||||
// remove graph
|
// remove graph
|
||||||
_setting.removeAt(it.itemId)
|
_setting.removeAt(it.itemId)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
val graphNumber = it.itemId / 100 - 1
|
val graphNumber = it.itemId / 100 - 1
|
||||||
val item = it.itemId % 100
|
val item = it.itemId % 100
|
||||||
_setting[graphNumber][item] = !it.isChecked
|
_setting[graphNumber][item] = !it.isChecked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (exception: Exception) {
|
||||||
|
fabricPrivacy.logException(exception)
|
||||||
|
}
|
||||||
storeGraphConfig()
|
storeGraphConfig()
|
||||||
setupChartMenu(context, chartButton)
|
setupChartMenu(context, chartButton)
|
||||||
rxBus.send(EventRefreshOverview("OnMenuItemClickListener", now = true))
|
rxBus.send(EventRefreshOverview("OnMenuItemClickListener", now = true))
|
||||||
|
|
|
@ -14,21 +14,21 @@ import info.nightscout.androidaps.interfaces.BgSource
|
||||||
import info.nightscout.androidaps.interfaces.PluginBase
|
import info.nightscout.androidaps.interfaces.PluginBase
|
||||||
import info.nightscout.androidaps.interfaces.PluginDescription
|
import info.nightscout.androidaps.interfaces.PluginDescription
|
||||||
import info.nightscout.androidaps.interfaces.PluginType
|
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.receivers.DataWorker
|
||||||
import info.nightscout.androidaps.services.Intents
|
import info.nightscout.androidaps.services.Intents
|
||||||
import info.nightscout.androidaps.interfaces.ResourceHelper
|
import info.nightscout.androidaps.interfaces.ResourceHelper
|
||||||
|
import info.nightscout.shared.logging.AAPSLogger
|
||||||
|
import info.nightscout.shared.logging.LTag
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
import kotlin.math.log
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class AidexPlugin @Inject constructor(
|
class AidexPlugin @Inject constructor(
|
||||||
injector: HasAndroidInjector,
|
injector: HasAndroidInjector,
|
||||||
rh: ResourceHelper,
|
rh: ResourceHelper,
|
||||||
aapsLogger: AAPSLogger
|
aapsLogger: AAPSLogger
|
||||||
) : PluginBase(PluginDescription()
|
) : PluginBase(
|
||||||
|
PluginDescription()
|
||||||
.mainType(PluginType.BGSOURCE)
|
.mainType(PluginType.BGSOURCE)
|
||||||
.fragmentClass(BGSourceFragment::class.java.name)
|
.fragmentClass(BGSourceFragment::class.java.name)
|
||||||
.pluginIcon((R.drawable.ic_blooddrop_48))
|
.pluginIcon((R.drawable.ic_blooddrop_48))
|
||||||
|
|
|
@ -6,37 +6,27 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context="info.nightscout.androidaps.plugins.general.food.FoodFragment">
|
tools:context="info.nightscout.androidaps.plugins.general.food.FoodFragment">
|
||||||
|
|
||||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
|
||||||
android:id="@+id/refresh_from_nightscout"
|
|
||||||
style="@style/GrayButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:drawableStart="@drawable/ic_refresh"
|
|
||||||
android:text="@string/refresheventsfromnightscout"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/filterinputLayout"
|
android:id="@+id/filter_input_layout"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/filter"
|
android:hint="@string/filter"
|
||||||
app:startIconDrawable="@android:drawable/ic_menu_search"
|
app:endIconMode="clear_text"
|
||||||
app:endIconMode="clear_text">
|
app:startIconDrawable="@android:drawable/ic_menu_search">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/filter"
|
android:id="@+id/filter"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:autofillHints="@string/notes_label"
|
android:autofillHints="@string/notes_label"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:textStyle="bold"
|
android:inputType="text|textCapSentences"
|
||||||
android:inputType="text|textCapSentences" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
|
@ -1,71 +1,45 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
style="@style/Widget.MaterialComponents.CardView"
|
|
||||||
android:id="@+id/food_card"
|
android:id="@+id/food_card"
|
||||||
|
style="@style/Widget.MaterialComponents.CardView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_gravity="center"
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
app:strokeWidth="1dp"
|
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:contentPadding="2dp"
|
app:contentPadding="2dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true" >
|
||||||
android:layout_gravity="center">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/food_item"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:baselineAligned="false"
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/left_right_split"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingEnd="3dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/name_and_info_container"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="start">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/name_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal" >
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/name"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="Name"
|
android:gravity="start"
|
||||||
android:textStyle="bold"
|
android:orientation="vertical">
|
||||||
android:textSize="@dimen/twenty_four_dp"
|
|
||||||
tools:ignore="HardcodedText" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
<TextView
|
||||||
|
android:id="@+id/name"
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/info_container"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:text="Name"
|
||||||
|
android:textSize="@dimen/twenty_four_dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal">
|
||||||
android:layout_marginStart="5dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/carbs"
|
android:id="@+id/carbs"
|
||||||
|
@ -107,43 +81,32 @@
|
||||||
android:text="Energy"
|
android:text="Energy"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
</LinearLayout>
|
||||||
android:id="@+id/buttons_container"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="end">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ic_calculator"
|
android:id="@+id/ic_calculator"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:padding="2dp"
|
android:contentDescription="@string/overview_calculator_label"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="-5dp"
|
||||||
|
android:paddingEnd="-5dp"
|
||||||
|
android:scaleX=".5"
|
||||||
|
android:scaleY=".5"
|
||||||
android:src="@drawable/ic_calculator" />
|
android:src="@drawable/ic_calculator" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ic_remove"
|
android:id="@+id/ic_remove"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:padding="2dp"
|
android:contentDescription="@string/remove_label"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
android:padding="2dp"
|
||||||
android:src="@drawable/ic_trash_outline" />
|
android:src="@drawable/ic_trash_outline" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="2dip"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:background="?android:attr/dividerHorizontal" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
|
@ -1,22 +1,20 @@
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android = "http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools = "http://schemas.android.com/tools"
|
xmlns:tools = "http://schemas.android.com/tools"
|
||||||
|
android:id = "@+id/swipeRefresh"
|
||||||
android:layout_width = "match_parent"
|
android:layout_width = "match_parent"
|
||||||
android:layout_height = "match_parent"
|
android:layout_height = "match_parent"
|
||||||
android:paddingTop="2dp"
|
|
||||||
tools:context=".plugins.aps.loop.LoopFragment">
|
tools:context=".plugins.aps.loop.LoopFragment">
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="2dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
style="@style/GrayButton"
|
|
||||||
android:id="@+id/run"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/openapsma_run" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -515,4 +513,7 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,20 @@
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android = "http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools = "http://schemas.android.com/tools"
|
xmlns:tools = "http://schemas.android.com/tools"
|
||||||
|
android:id = "@+id/swipeRefresh"
|
||||||
android:layout_width = "match_parent"
|
android:layout_width = "match_parent"
|
||||||
android:layout_height = "match_parent"
|
android:layout_height = "match_parent"
|
||||||
android:paddingTop="2dp"
|
|
||||||
tools:context=".plugins.aps.openAPSAMA.OpenAPSAMAFragment">
|
tools:context=".plugins.aps.openAPSAMA.OpenAPSAMAFragment">
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="2dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
style="@style/GrayButton"
|
|
||||||
android:id="@+id/run"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/openapsma_run" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -580,4 +571,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
|
@ -72,6 +72,7 @@
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:maxHeight="5dp"
|
android:maxHeight="5dp"
|
||||||
android:minHeight="3dp"
|
android:minHeight="3dp"
|
||||||
|
android:scaleY="5"
|
||||||
tools:progress="50" />
|
tools:progress="50" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
|
|
|
@ -348,7 +348,7 @@
|
||||||
<color name="aaps_theme_dark_onErrorContainer">#F9DEDC</color>
|
<color name="aaps_theme_dark_onErrorContainer">#F9DEDC</color>
|
||||||
<color name="aaps_theme_dark_background">#1D1B1E</color>
|
<color name="aaps_theme_dark_background">#1D1B1E</color>
|
||||||
<color name="aaps_theme_dark_onBackground">#E7E1E5</color>
|
<color name="aaps_theme_dark_onBackground">#E7E1E5</color>
|
||||||
<color name="aaps_theme_dark_surface">#1D1B1E</color>
|
<color name="aaps_theme_dark_surface">#0F0F0F</color>
|
||||||
<color name="aaps_theme_dark_onSurface">#E7E1E5</color>
|
<color name="aaps_theme_dark_onSurface">#E7E1E5</color>
|
||||||
<color name="aaps_theme_dark_surfaceVariant">#49454F</color>
|
<color name="aaps_theme_dark_surfaceVariant">#49454F</color>
|
||||||
<color name="aaps_theme_dark_onSurfaceVariant">#CAC4D0</color>
|
<color name="aaps_theme_dark_onSurfaceVariant">#CAC4D0</color>
|
||||||
|
|
Loading…
Reference in a new issue