diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java index 21a3e1b271..2891bc7f23 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java @@ -7,7 +7,6 @@ import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; -import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.os.Handler; @@ -25,7 +24,6 @@ import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; -import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.PopupMenu; import androidx.core.content.res.ResourcesCompat; import androidx.fragment.app.Fragment; @@ -184,7 +182,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, boolean smallWidth; boolean smallHeight; - public static boolean shorttextmode = false; + public static boolean shorttextmode = true; private boolean accepted; @@ -239,7 +237,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, timeAgoShortView = (TextView) view.findViewById(R.id.overview_timeagoshort); deltaView = (TextView) view.findViewById(R.id.overview_delta); deltaShortView = (TextView) view.findViewById(R.id.overview_deltashort); - avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta); + // TODO: avgdeltaView in Expertmode + //avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta); baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal); extendedBolusView = (TextView) view.findViewById(R.id.overview_extendedbolus); activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile); @@ -1162,9 +1161,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, if (activeTemp != null) { fullText += MainApp.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull(); } - OKDialog.show(getActivity(), MainApp.gs(R.string.basal), fullText); + OKDialog.show(getActivity(), MainApp.gs(R.string.basal), fullText, null); }); - } else { if (activeTemp != null) { basalText = activeTemp.toStringFull() + " "; @@ -1175,12 +1173,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, basalText += "(" + DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + "U/h)"; } } - if (activeTemp != null) { - baseBasalView.setTextColor(MainApp.gc(R.color.basal)); - } else { - baseBasalView.setTextColor(Color.WHITE); - - } baseBasalView.setText(basalText); diff --git a/app/src/main/res/layout/overview_fragment.xml b/app/src/main/res/layout/overview_fragment.xml index 8741cf1c2a..3cff754c07 100644 --- a/app/src/main/res/layout/overview_fragment.xml +++ b/app/src/main/res/layout/overview_fragment.xml @@ -97,87 +97,203 @@ - - - - - + android:orientation="horizontal"> - + - + + + + + android:layout_weight="1" + android:layout_marginTop="2dp" + android:layout_marginBottom="10dp" + android:orientation="vertical"> + + + - - - - - + android:layout_weight="1" + android:layout_marginTop="6dp" + android:orientation="vertical"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -244,100 +360,9 @@ android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/mdtp_white" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_height="match_parent" + android:layout_above="@+id/overview_buttons" + android:fillViewport="true"> + android:orientation="vertical"> - - - - - - - - - - - - - + android:layout_height="wrap_content"> - - - - - + + android:orientation="horizontal" + android:paddingTop="2dp"> - - - - + + + + - - - - - + android:orientation="horizontal" + android:paddingTop="2dp"> - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + android:textAlignment="center" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="@color/mdtp_white" /> + + android:layout_height="100dp" + android:visibility="gone" /> + + + + + android:orientation="horizontal" + android:visibility="gone"> + android:orientation="horizontal" + android:paddingRight="5dp"> + android:textSize="10sp" + android:visibility="gone" /> + android:textSize="10sp" + android:visibility="gone" /> + android:textSize="10sp" + android:visibility="gone" /> - - + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 2ebd12c7a5..6e11ebcf80 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -14,7 +14,7 @@ #d3f166 #FFFFFF00 #FFFF00FF - #00FF00 + #A4ECEA #FF0000 #FFFF00 #FFFF00