Update "Loop header"

This commit is contained in:
Philoul 2020-12-26 18:26:46 +01:00
parent cefdaa471d
commit 329e5af94f
2 changed files with 4 additions and 1 deletions

View file

@ -110,6 +110,7 @@ class LoopDialog : DaggerDialogFragment() {
if (loopPlugin.isEnabled(PluginType.LOOP)) { if (loopPlugin.isEnabled(PluginType.LOOP)) {
overview_enable?.visibility = View.GONE //sp.getBoolean(R.string.key_usesuperbolus, false).toVisibility() overview_enable?.visibility = View.GONE //sp.getBoolean(R.string.key_usesuperbolus, false).toVisibility()
overview_disable?.visibility = View.VISIBLE overview_disable?.visibility = View.VISIBLE
overview_loop_header?.text = resourceHelper.gs(R.string.disableloop)
if (!loopPlugin.isSuspended) { if (!loopPlugin.isSuspended) {
overview_suspend_header?.text=resourceHelper.gs(R.string.suspendloop) overview_suspend_header?.text=resourceHelper.gs(R.string.suspendloop)
overview_resume?.visibility = View.GONE overview_resume?.visibility = View.GONE
@ -127,6 +128,7 @@ class LoopDialog : DaggerDialogFragment() {
} else { } else {
overview_enable?.visibility = View.VISIBLE overview_enable?.visibility = View.VISIBLE
overview_disable?.visibility = View.GONE overview_disable?.visibility = View.GONE
overview_loop_header?.text = resourceHelper.gs(R.string.enableloop)
overview_suspend?.visibility = View.GONE overview_suspend?.visibility = View.GONE
} }
if (!loopPlugin.isDisconnected) { if (!loopPlugin.isDisconnected) {

View file

@ -56,12 +56,13 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/overview_loop_header"
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_gravity="center_vertical"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:text="@string/loop" android:text="@string/disableloop"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
<info.nightscout.androidaps.utils.ui.SingleClickButton <info.nightscout.androidaps.utils.ui.SingleClickButton