unify layouts

This commit is contained in:
Milos Kozak 2020-05-03 00:32:26 +02:00
parent 2723e6615d
commit 8fe57c9d7a
11 changed files with 647 additions and 1901 deletions

View file

@ -68,31 +68,28 @@ import info.nightscout.androidaps.utils.wizard.QuickWizard
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.overview_fragment.*
import kotlinx.android.synthetic.main.overview_fragment.overview_activeprofile
import kotlinx.android.synthetic.main.overview_fragment.overview_apsmode
import kotlinx.android.synthetic.main.overview_fragment.overview_arrow
import kotlinx.android.synthetic.main.overview_fragment.overview_basebasal
import kotlinx.android.synthetic.main.overview_fragment.overview_bg
import kotlinx.android.synthetic.main.overview_fragment.overview_bggraph
import kotlinx.android.synthetic.main.overview_fragment.overview_carbsbutton
import kotlinx.android.synthetic.main.overview_fragment.overview_chartMenuButton
import kotlinx.android.synthetic.main.overview_fragment.overview_cob
import kotlinx.android.synthetic.main.overview_fragment.overview_extendedbolus
import kotlinx.android.synthetic.main.overview_fragment.overview_insulinbutton
import kotlinx.android.synthetic.main.overview_fragment.overview_iob
import kotlinx.android.synthetic.main.overview_fragment.overview_iobcalculationprogess
import kotlinx.android.synthetic.main.overview_fragment.overview_iobgraph
import kotlinx.android.synthetic.main.overview_fragment.overview_looplayout
import kotlinx.android.synthetic.main.overview_buttons_layout.*
import kotlinx.android.synthetic.main.overview_buttons_layout.overview_carbsbutton
import kotlinx.android.synthetic.main.overview_buttons_layout.overview_insulinbutton
import kotlinx.android.synthetic.main.overview_buttons_layout.overview_quickwizardbutton
import kotlinx.android.synthetic.main.overview_buttons_layout.overview_treatmentbutton
import kotlinx.android.synthetic.main.overview_buttons_layout.overview_wizardbutton
import kotlinx.android.synthetic.main.overview_fragment.overview_notifications
import kotlinx.android.synthetic.main.overview_fragment.overview_pumpstatus
import kotlinx.android.synthetic.main.overview_fragment.overview_pumpstatuslayout
import kotlinx.android.synthetic.main.overview_fragment.overview_quickwizardbutton
import kotlinx.android.synthetic.main.overview_fragment.overview_sensitivity
import kotlinx.android.synthetic.main.overview_fragment.overview_temptarget
import kotlinx.android.synthetic.main.overview_fragment.overview_treatmentbutton
import kotlinx.android.synthetic.main.overview_fragment.overview_wizardbutton
import kotlinx.android.synthetic.main.overview_fragment_nsclient_tablet.*
import kotlinx.android.synthetic.main.overview_graphs_layout.overview_bggraph
import kotlinx.android.synthetic.main.overview_graphs_layout.overview_chartMenuButton
import kotlinx.android.synthetic.main.overview_graphs_layout.overview_iobcalculationprogess
import kotlinx.android.synthetic.main.overview_graphs_layout.overview_iobgraph
import kotlinx.android.synthetic.main.overview_info_layout.*
import kotlinx.android.synthetic.main.overview_info_layout.overview_arrow
import kotlinx.android.synthetic.main.overview_info_layout.overview_basebasal
import kotlinx.android.synthetic.main.overview_info_layout.overview_bg
import kotlinx.android.synthetic.main.overview_info_layout.overview_cob
import kotlinx.android.synthetic.main.overview_info_layout.overview_extendedbolus
import kotlinx.android.synthetic.main.overview_info_layout.overview_iob
import kotlinx.android.synthetic.main.overview_info_layout.overview_sensitivity
import kotlinx.android.synthetic.main.overview_loop_pumpstatus_layout.*
import kotlinx.android.synthetic.main.overview_statuslights_layout.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
@ -172,8 +169,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
inflater.inflate(R.layout.overview_fragment_nsclient, container, false)
smallHeight || landscape ->
inflater.inflate(R.layout.overview_fragment, container, false)
// inflater.inflate(R.layout.overview_fragment_landscape, container, false)
inflater.inflate(R.layout.overview_fragment_landscape, container, false)
else ->
inflater.inflate(R.layout.overview_fragment, container, false)

View file

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/overview_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_accepttempbutton"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/setbasalquestion"
android:textColor="@color/colorAcceptTempButton"
android:visibility="gone" />
<LinearLayout
android:id="@+id/overview_buttons_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="0dp"
android:paddingEnd="5dp" >
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_treatmentbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_insulin_carbs"
android:text="@string/overview_treatment_label"
android:textColor="@color/colorTreatmentButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_insulinbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_bolus"
android:text="@string/overview_insulin_label"
android:textColor="@color/colorInsulinButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_carbsbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_cp_bolus_carbs"
android:text="@string/overview_carbs_label"
android:textColor="@color/colorCarbsButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_wizardbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calculator"
android:text="@string/overview_calculator_label"
android:textColor="@color/colorCalculatorButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_calibrationbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calibration"
android:text="@string/overview_calibration"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_cgmbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_xdrip"
android:text="@string/overview_cgm"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_quickwizardbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_quickwizard"
android:text="@string/quickwizard"
android:textColor="@color/colorQuickWizardButton"
android:textSize="10sp" />
</LinearLayout>
</LinearLayout>

View file

@ -1,597 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".plugins.general.overview.OverviewFragment">
<ScrollView
android:id="@+id/overview_toppart_scrollbar"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/overview_accepttempbutton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/overview_notifications"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/overview_looplayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.recyclerview.widget.RecyclerView>
<LinearLayout
android:id="@+id/overview_looplayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/overview_pumpstatuslayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_notifications">
android:layout_height="wrap_content" />
<TextView
android:id="@+id/overview_activeprofile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginEnd="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="Profile"
android:textAppearance="?android:attr/textAppearanceSmall" />
<include layout="@layout/overview_loop_pumpstatus_layout" />
<TextView
android:id="@+id/overview_temptarget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="TempTarget"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" />
<include layout="@layout/overview_info_layout" />
</LinearLayout>
<include layout="@layout/overview_statuslights_layout" />
<LinearLayout
android:id="@+id/overview_pumpstatuslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/info_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_looplayout">
<include layout="@layout/overview_graphs_layout" />
<TextView
android:id="@+id/overview_pumpstatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/info_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/overview_statuslights"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_pumpstatuslayout">
<TextView
android:id="@+id/overview_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="00.0"
android:textSize="60sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/overview_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:paddingStart="-2dp"
android:paddingEnd="0dp"
android:text="→"
android:textSize="42sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_deltas_llayout"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/overview_bg"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
<LinearLayout
android:id="@+id/overview_deltas_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_apsmode_llayout"
app:layout_constraintStart_toEndOf="@+id/overview_arrow"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/overview_timeago"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<TextView
android:id="@+id/overview_delta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<TextView
android:id="@+id/overview_avgdelta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_apsmode_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/overview_deltas_llayout"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/overview_apsmode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="-4dp"
android:src="@drawable/closedloop" />
<TextView
android:id="@+id/overview_apsmode_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="Open Loop"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_iob_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_cob_llayout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/icon_bolus" />
<TextView
android:id="@+id/overview_iob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_cob_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_basal_llayout"
app:layout_constraintStart_toEndOf="@+id/overview_iob_llayout"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/icon_cp_bolus_carbs" />
<TextView
android:id="@+id/overview_cob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_basal_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_extended_llayout"
app:layout_constraintStart_toEndOf="@+id/overview_cob_llayout"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:id="@+id/overview_basebasal_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/icon_cp_basal_start" />
<TextView
android:id="@+id/overview_basebasal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_extended_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_as_llayout"
app:layout_constraintStart_toEndOf="@+id/overview_basal_llayout"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/icon_actions_startextbolus" />
<TextView
android:id="@+id/overview_extendedbolus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_as_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_extended_llayout"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/ic_swap_vert_black_48dp_green" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/overview_statuslights"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:background="?android:attr/colorControlHighlight"
android:orientation="horizontal"
android:paddingTop="4dp"
android:paddingBottom="4dp"
app:layout_constraintBottom_toTopOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/info_layout">
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_canula" />
<TextView
android:id="@+id/careportal_canulaage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_insulin" />
<TextView
android:id="@+id/careportal_insulinage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<TextView
android:id="@+id/careportal_reservoirlevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_sensor" />
<TextView
android:id="@+id/careportal_sensorage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_battery" />
<TextView
android:id="@+id/careportal_pbage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<TextView
android:id="@+id/careportal_batterylevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
</LinearLayout>
<com.jjoe64.graphview.GraphView
android:id="@+id/overview_bggraph"
android:layout_width="0dp"
android:layout_height="200dp"
app:layout_constraintBottom_toTopOf="@+id/overview_iobgraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_statuslights" />
<ImageButton
android:id="@+id/overview_chartMenuButton"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/chartmenu"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph"
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
<TextView
android:id="@+id/overview_iobcalculationprogess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text=""
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintStart_toStartOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph" />
<LinearLayout
android:id="@+id/overview_iobgraph"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_bggraph" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</ScrollView>
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_accepttempbutton"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/setbasalquestion"
android:textColor="@color/colorAcceptTempButton"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/overview_buttons_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_toppart_scrollbar" />
<include layout="@layout/overview_buttons_layout" />
<LinearLayout
android:id="@+id/overview_buttons_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="0dp"
android:paddingEnd="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_accepttempbutton">
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_treatmentbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_insulin_carbs"
android:text="@string/overview_treatment_label"
android:textColor="@color/colorTreatmentButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_insulinbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_bolus"
android:text="@string/overview_insulin_label"
android:textColor="@color/colorInsulinButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_carbsbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_cp_bolus_carbs"
android:text="@string/overview_carbs_label"
android:textColor="@color/colorCarbsButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_wizardbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calculator"
android:text="@string/overview_calculator_label"
android:textColor="@color/colorCalculatorButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_calibrationbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calibration"
android:text="@string/overview_calibration"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_cgmbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_xdrip"
android:text="@string/overview_cgm"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_quickwizardbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_quickwizard"
android:text="@string/quickwizard"
android:textColor="@color/colorQuickWizardButton"
android:textSize="10sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

View file

@ -1,628 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".plugins.general.overview.OverviewFragment">
<ScrollView
android:id="@+id/overview_toppart_scrollbar"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:layout_weight="1"
tools:ignore="UselessParent">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/overview_notifications"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/overview_looplayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.recyclerview.widget.RecyclerView>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/overview_looplayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/overview_pumpstatuslayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_notifications">
android:layout_height="wrap_content" />
<TextView
android:id="@+id/overview_apsmode"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/openloop"
android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_activeprofile"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include layout="@layout/overview_loop_pumpstatus_layout" />
<include layout="@layout/overview_info_layout" />
<TextView
android:id="@+id/overview_activeprofile"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/profile"
android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_temptarget"
app:layout_constraintStart_toEndOf="@+id/overview_apsmode"
app:layout_constraintTop_toTopOf="parent" />
<include layout="@layout/overview_statuslights_layout" />
<TextView
android:id="@+id/overview_temptarget"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/temptargetshort"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_activeprofile"
app:layout_constraintTop_toTopOf="parent" />
<include layout="@layout/overview_graphs_layout" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include layout="@layout/overview_buttons_layout" />
<LinearLayout
android:id="@+id/overview_pumpstatuslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/info_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_looplayout">
<TextView
android:id="@+id/overview_pumpstatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/info_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/overview_statuslights"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_pumpstatuslayout">
<TextView
android:id="@+id/overview_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="00.0"
android:textSize="42sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/overview_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:paddingStart="-2dp"
android:paddingEnd="0dp"
android:text="→"
android:textSize="28sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_bg_guideline"
app:layout_constraintStart_toEndOf="@+id/overview_bg"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
<TextView
android:id="@+id/overview_hor_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_bg_guideline"
app:layout_constraintStart_toEndOf="@+id/overview_arrow"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
<TextView
android:id="@+id/overview_timeago"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1 min ago"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/overview_delta"
app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_bg" />
<TextView
android:id="@+id/overview_delta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="delta 15m: 0.3"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/overview_avgdelta"
app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_timeago" />
<TextView
android:id="@+id/overview_avgdelta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="delta 40m: 0.3"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_delta" />
<!-- right side -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/overview_bg_guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_iob_label"
app:layout_constraintGuide_percent="0.40"
app:layout_constraintStart_toEndOf="@+id/overview_hor_space"
app:layout_constraintTop_toTopOf="parent" />
<!-- right side IOB -->
<TextView
android:id="@+id/overview_iob_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/iob"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_cob_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="parent" />
<TextView
android:id="@+id/overview_iob_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_iob_label"
app:layout_constraintTop_toTopOf="@+id/overview_iob_label" />
<TextView
android:id="@+id/overview_iob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/iob"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_iob_label"
app:layout_constraintStart_toEndOf="@+id/overview_iob_colon" />
<!-- right side COB -->
<TextView
android:id="@+id/overview_cob_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cob"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_basebasal_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_iob_label" />
<TextView
android:id="@+id/overview_cob_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_cob_label"
app:layout_constraintTop_toBottomOf="@+id/overview_iob_label" />
<TextView
android:id="@+id/overview_cob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/cob"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_cob_label"
app:layout_constraintStart_toEndOf="@+id/overview_cob_colon" />
<!-- right side basal -->
<TextView
android:id="@+id/overview_basebasal_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/basal_short"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_extendedbolus_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_cob_label" />
<TextView
android:id="@+id/overview_basebasal_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_basebasal_label"
app:layout_constraintTop_toBottomOf="@+id/overview_cob_label" />
<TextView
android:id="@+id/overview_basebasal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="0.50U/h @17:35 1/30min"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_basebasal_label"
app:layout_constraintStart_toEndOf="@+id/overview_basebasal_colon" />
<!-- right side extended -->
<TextView
android:id="@+id/overview_extendedbolus_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/extended_bolus_short"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_basebasal_label" />
<TextView
android:id="@+id/overview_extendedbolus_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_extendedbolus_label"
app:layout_constraintStart_toEndOf="@+id/overview_extendedbolus_label" />
<TextView
android:id="@+id/overview_extendedbolus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="0.50U/h @17:35 1/30min"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_extendedbolus_label"
app:layout_constraintStart_toEndOf="@+id/overview_extendedbolus_colon" />
<!-- right side AS -->
<TextView
android:id="@+id/overview_sensitivity_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sensitivity_short"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_extendedbolus_label" />
<TextView
android:id="@+id/overview_sensitivity_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_sensitivity_label" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="100%"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_sensitivity_colon" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/overview_statuslights"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:background="?android:attr/colorControlHighlight"
android:orientation="horizontal"
android:paddingTop="4dp"
android:paddingBottom="4dp"
app:layout_constraintBottom_toTopOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/info_layout">
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_canula" />
<TextView
android:id="@+id/careportal_canulaage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_insulin" />
<TextView
android:id="@+id/careportal_insulinage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<TextView
android:id="@+id/careportal_reservoirlevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_sensor" />
<TextView
android:id="@+id/careportal_sensorage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_battery" />
<TextView
android:id="@+id/careportal_pbage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="1dp"
android:textSize="14sp" />
<TextView
android:id="@+id/careportal_batterylevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
</LinearLayout>
<com.jjoe64.graphview.GraphView
android:id="@+id/overview_bggraph"
android:layout_width="0dp"
android:layout_height="200dp"
app:layout_constraintBottom_toTopOf="@+id/overview_iobgraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_statuslights" />
<ImageButton
android:id="@+id/overview_chartMenuButton"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/chartmenu"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph"
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
<TextView
android:id="@+id/overview_iobcalculationprogess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text=""
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintStart_toStartOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph" />
<LinearLayout
android:id="@+id/overview_iobgraph"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/overview_accepttempbutton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_bggraph" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_accepttempbutton"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/setbasalquestion"
android:textColor="@color/colorAcceptTempButton"
app:layout_constraintBottom_toTopOf="@id/overview_buttons_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_iobgraph"
android:visibility="gone"/>
<LinearLayout
android:id="@+id/overview_buttons_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="0dp"
android:paddingEnd="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_accepttempbutton">
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_treatmentbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_insulin_carbs"
android:text="@string/overview_treatment_label"
android:textColor="@color/colorTreatmentButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_insulinbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_bolus"
android:text="@string/overview_insulin_label"
android:textColor="@color/colorInsulinButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_carbsbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_cp_bolus_carbs"
android:text="@string/overview_carbs_label"
android:textColor="@color/colorCarbsButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_wizardbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calculator"
android:text="@string/overview_calculator_label"
android:textColor="@color/colorCalculatorButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_calibrationbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calibration"
android:text="@string/overview_calibration"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_cgmbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_xdrip"
android:text="@string/overview_cgm"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_quickwizardbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_quickwizard"
android:text="@string/quickwizard"
android:textColor="@color/colorQuickWizardButton"
android:textSize="10sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

View file

@ -1,466 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".plugins.general.overview.OverviewFragment">
<ScrollView
android:id="@+id/overview_toppart_scrollbar"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/overview_buttons_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/overview_notifications"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/overview_looplayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.recyclerview.widget.RecyclerView>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/overview_looplayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/overview_pumpstatuslayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_notifications">
android:layout_height="wrap_content" />
<TextView
android:id="@+id/overview_apsmode"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/openloop"
android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_activeprofile"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include layout="@layout/overview_loop_pumpstatus_layout" />
<include layout="@layout/overview_info_layout" />
<TextView
android:id="@+id/overview_activeprofile"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/profile"
android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_temptarget"
app:layout_constraintStart_toEndOf="@+id/overview_apsmode"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/overview_temptarget"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/temptargetshort"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_activeprofile"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/overview_pumpstatuslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/info_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_looplayout">
<TextView
android:id="@+id/overview_pumpstatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/info_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/overview_statuslights"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_pumpstatuslayout">
<TextView
android:id="@+id/overview_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="00.0"
android:textSize="42sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/overview_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:paddingStart="-2dp"
android:paddingEnd="0dp"
android:text="→"
android:textSize="28sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_bg_guideline"
app:layout_constraintStart_toEndOf="@+id/overview_bg"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
<TextView
android:id="@+id/overview_hor_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_bg_guideline"
app:layout_constraintStart_toEndOf="@+id/overview_arrow"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
<TextView
android:id="@+id/overview_timeago"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1 min ago"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/overview_delta"
app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_bg" />
<TextView
android:id="@+id/overview_delta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="delta 15m: 0.35"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/overview_avgdelta"
app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_timeago" />
<TextView
android:id="@+id/overview_avgdelta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="delta 40m: 0.1"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_delta" />
<!-- right side -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/overview_bg_guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_iob_label"
app:layout_constraintGuide_percent="0.40"
app:layout_constraintStart_toEndOf="@+id/overview_hor_space"
app:layout_constraintTop_toTopOf="parent" />
<!-- right side IOB -->
<TextView
android:id="@+id/overview_iob_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/iob"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_cob_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="parent" />
<TextView
android:id="@+id/overview_iob_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_iob_label"
app:layout_constraintTop_toTopOf="@+id/overview_iob_label" />
<TextView
android:id="@+id/overview_iob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/iob"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_iob_label"
app:layout_constraintStart_toEndOf="@+id/overview_iob_colon" />
<!-- right side COB -->
<TextView
android:id="@+id/overview_cob_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cob"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_basebasal_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_iob_label" />
<TextView
android:id="@+id/overview_cob_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_cob_label"
app:layout_constraintTop_toBottomOf="@+id/overview_iob_label" />
<TextView
android:id="@+id/overview_cob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/cob"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_cob_label"
app:layout_constraintStart_toEndOf="@+id/overview_cob_colon" />
<!-- right side basal -->
<TextView
android:id="@+id/overview_basebasal_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/basal_short"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_extendedbolus_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_cob_label" />
<TextView
android:id="@+id/overview_basebasal_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_basebasal_label"
app:layout_constraintTop_toBottomOf="@+id/overview_cob_label" />
<TextView
android:id="@+id/overview_basebasal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="0.50U/h @17:35 1/30min"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_basebasal_label"
app:layout_constraintStart_toEndOf="@+id/overview_basebasal_colon" />
<!-- right side extended -->
<TextView
android:id="@+id/overview_extendedbolus_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/extended_bolus_short"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_basebasal_label" />
<TextView
android:id="@+id/overview_extendedbolus_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_extendedbolus_label"
app:layout_constraintStart_toEndOf="@+id/overview_extendedbolus_label" />
<TextView
android:id="@+id/overview_extendedbolus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="0.50U/h @17:35 1/30min"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_extendedbolus_label"
app:layout_constraintStart_toEndOf="@+id/overview_extendedbolus_colon" />
<!-- right side AS -->
<TextView
android:id="@+id/overview_sensitivity_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sensitivity_short"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_extendedbolus_label" />
<TextView
android:id="@+id/overview_sensitivity_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_sensitivity_label" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="100%"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_sensitivity_colon" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/overview_statuslights"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:background="?android:attr/colorControlHighlight"
android:orientation="horizontal"
android:paddingTop="4dp"
android:paddingBottom="4dp"
app:layout_constraintBottom_toTopOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/info_layout">
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_canula" />
<TextView
android:id="@+id/careportal_canulaage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_insulin" />
<TextView
android:id="@+id/careportal_insulinage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<TextView
android:id="@+id/careportal_reservoirlevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_sensor" />
<TextView
android:id="@+id/careportal_sensorage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_battery" />
<TextView
android:id="@+id/careportal_pbage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="1dp"
android:textSize="14sp" />
<TextView
android:id="@+id/careportal_batterylevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
</LinearLayout>
<include layout="@layout/overview_statuslights_layout" />
<TextView
android:id="@+id/overview_pump"
@ -470,189 +36,36 @@
android:paddingEnd="4sp"
android:text="Pump: running"
android:textColor="@android:color/white"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_openaps"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_statuslights" />
android:textSize="16sp" />
<TextView
android:id="@+id/overview_openaps"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="4sp"
android:paddingEnd="4sp"
android:text="OAPS: 3 min ago"
android:textColor="@android:color/white"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_bggraph"
app:layout_constraintEnd_toStartOf="@+id/overview_uploader"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_pump" />
android:textSize="16sp" />
<TextView
android:id="@+id/overview_uploader"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:paddingStart="4sp"
android:paddingEnd="4sp"
android:text="UPLD: 84%"
android:textColor="@android:color/white"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/overview_openaps"
app:layout_constraintTop_toBottomOf="@+id/overview_pump" />
android:textSize="16sp" />
<com.jjoe64.graphview.GraphView
android:id="@+id/overview_bggraph"
android:layout_width="0dp"
android:layout_height="200dp"
app:layout_constraintBottom_toTopOf="@+id/overview_iobgraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_openaps" />
<include layout="@layout/overview_graphs_layout" />
<ImageButton
android:id="@+id/overview_chartMenuButton"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/chartmenu"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph"
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
<TextView
android:id="@+id/overview_iobcalculationprogess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text=""
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintStart_toStartOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph" />
<LinearLayout
android:id="@+id/overview_iobgraph"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_bggraph" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/overview_buttons_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="0dp"
android:paddingEnd="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_toppart_scrollbar">
<include layout="@layout/overview_buttons_layout" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_treatmentbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_insulin_carbs"
android:text="@string/overview_treatment_label"
android:textColor="@color/colorTreatmentButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_insulinbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_bolus"
android:text="@string/overview_insulin_label"
android:textColor="@color/colorInsulinButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_carbsbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_cp_bolus_carbs"
android:text="@string/overview_carbs_label"
android:textColor="@color/colorCarbsButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_wizardbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calculator"
android:text="@string/overview_calculator_label"
android:textColor="@color/colorCalculatorButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_calibrationbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calibration"
android:text="@string/overview_calibration"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_cgmbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_xdrip"
android:text="@string/overview_cgm"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_quickwizardbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_quickwizard"
android:text="@string/quickwizard"
android:textColor="@color/colorQuickWizardButton"
android:textSize="10sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

View file

@ -27,82 +27,7 @@
</androidx.recyclerview.widget.RecyclerView>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/overview_looplayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/overview_pumpstatuslayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_notifications">
<TextView
android:id="@+id/overview_apsmode"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/openloop"
android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_activeprofile"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/overview_activeprofile"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/profile"
android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_temptarget"
app:layout_constraintStart_toEndOf="@+id/overview_apsmode"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/overview_temptarget"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/temptargetshort"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_activeprofile"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/overview_pumpstatuslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="2dp">
<TextView
android:id="@+id/overview_pumpstatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<include layout="@layout/overview_loop_pumpstatus_layout" />
<LinearLayout
android:layout_width="match_parent"

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1">
<com.jjoe64.graphview.GraphView
android:id="@+id/overview_bggraph"
android:layout_width="wrap_content"
android:layout_height="200dp" />
<ImageButton
android:id="@+id/overview_chartMenuButton"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:contentDescription="@string/chartmenu"
android:paddingTop="5dp"
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
<TextView
android:id="@+id/overview_iobcalculationprogess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</RelativeLayout>
<LinearLayout
android:id="@+id/overview_iobgraph"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>

View file

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/info_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/overview_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="00.0"
android:textSize="60sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/overview_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:paddingStart="-2dp"
android:paddingEnd="0dp"
android:text="→"
android:textSize="42sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_deltas_llayout"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/overview_bg"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
<LinearLayout
android:id="@+id/overview_deltas_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_apsmode_llayout"
app:layout_constraintStart_toEndOf="@+id/overview_arrow"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/overview_timeago"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<TextView
android:id="@+id/overview_delta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<TextView
android:id="@+id/overview_avgdelta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_apsmode_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/overview_deltas_llayout"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/overview_apsmode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="-4dp"
android:src="@drawable/closedloop" />
<TextView
android:id="@+id/overview_apsmode_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="Open Loop"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_iob_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_cob_llayout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/icon_bolus" />
<TextView
android:id="@+id/overview_iob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_cob_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_basal_llayout"
app:layout_constraintStart_toEndOf="@+id/overview_iob_llayout"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/icon_cp_bolus_carbs" />
<TextView
android:id="@+id/overview_cob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_basal_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_extended_llayout"
app:layout_constraintStart_toEndOf="@+id/overview_cob_llayout"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:id="@+id/overview_basebasal_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/icon_cp_basal_start" />
<TextView
android:id="@+id/overview_basebasal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_extended_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toStartOf="@+id/overview_as_llayout"
app:layout_constraintStart_toEndOf="@+id/overview_basal_llayout"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/icon_actions_startextbolus" />
<TextView
android:id="@+id/overview_extendedbolus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_as_llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_extended_llayout"
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/ic_swap_vert_black_48dp_green" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="n/a"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textStyle="bold" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/overview_looplayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/overview_activeprofile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginEnd="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="Profile"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/overview_temptarget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="TempTarget"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_pumpstatuslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/overview_pumpstatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
</LinearLayout>

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/notification_cardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -10,31 +9,27 @@
card_view:cardBackgroundColor="@color/cardColorBackground"
card_view:cardCornerRadius="6dp">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/notification_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_weight="1"
android:maxLines="4"
android:text="Notification text. Notification text. Notification text. Notification text. Notification text. Notification text. " />
<Button
android:id="@+id/notification_dismiss"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:text="@string/dismiss"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintTop_toTopOf="parent" />
android:text="@string/dismiss" />
<TextView
android:id="@+id/notification_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:maxLines="4"
android:text="Notification text. Notification text. Notification text. Notification text. Notification text. Notification text. "
card_view:layout_constraintEnd_toStartOf="@+id/notification_dismiss"
card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>

View file

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/overview_statuslights"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:background="?android:attr/colorControlHighlight"
android:orientation="horizontal"
android:paddingTop="4dp"
android:paddingBottom="4dp">
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_canula" />
<TextView
android:id="@+id/careportal_canulaage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_insulin" />
<TextView
android:id="@+id/careportal_insulinage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<TextView
android:id="@+id/careportal_reservoirlevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_sensor" />
<TextView
android:id="@+id/careportal_sensorage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_battery" />
<TextView
android:id="@+id/careportal_pbage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="1dp"
android:textSize="14sp" />
<TextView
android:id="@+id/careportal_batterylevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
</LinearLayout>