From 9ac88f7def130bd33b7c00797a3b0ebd73c754f3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 10 May 2020 21:07:58 +0200 Subject: [PATCH] remove mdtp library --- app/build.gradle | 1 - .../general/actions/ActionsFragment.kt | 8 +---- app/src/main/res/layout/actions_fragment.xml | 4 +-- app/src/main/res/values/colors.xml | 7 ---- app/src/main/res/values/dimens.xml | 6 ---- app/src/main/res/values/strings.xml | 13 -------- .../res/drawable-hdpi/background_darkgray.xml | 0 .../main/res/drawable-hdpi/border_gray.xml | 0 .../res/drawable-hdpi/icon_home_profile.png | Bin .../res/drawable-hdpi}/toast_border_ok.xml | 24 +++++++------- .../res/drawable-mdpi/icon_home_profile.png | Bin .../res/drawable-xhdpi/icon_home_profile.png | Bin .../res/drawable-xxhdpi/icon_home_profile.png | Bin .../drawable-xxxhdpi/icon_home_profile.png | Bin .../main/res/drawable/alert_border_error.xml | 30 +++++++++--------- .../res/drawable/alert_border_warning.xml | 30 +++++++++--------- .../drawable/ic_trending_flat_white_48dp.xml | 0 .../main/res/drawable/icon_home_profile.png | Bin .../mdtp_material_button_background.xml | 6 ++++ .../mdtp_material_button_selected.xml | 13 ++++++++ .../src/main/res/drawable/pillborder.xml | 0 .../main/res/layout/danar_statsactivity.xml | 21 ++++-------- .../main/res/layout/dialog_alert_custom.xml | 4 +-- .../main/res/layout/dialog_bolusprogress.xml | 2 +- .../main/res/layout/dialog_profileviewer.xml | 2 +- core/src/main/res/layout/okcancel.xml | 8 ++--- core/src/main/res/values/colors.xml | 14 ++++++++ core/src/main/res/values/dimens.xml | 8 +++++ core/src/main/res/values/strings.xml | 13 ++++++++ core/src/main/res/values/styles.xml | 28 +++++++++++++++- .../main/res/layout/danar_historyactivity.xml | 2 +- 31 files changed, 140 insertions(+), 104 deletions(-) rename {app => core}/src/main/res/drawable-hdpi/background_darkgray.xml (100%) rename {app => core}/src/main/res/drawable-hdpi/border_gray.xml (100%) rename {app => core}/src/main/res/drawable-hdpi/icon_home_profile.png (100%) rename {app/src/main/res/drawable => core/src/main/res/drawable-hdpi}/toast_border_ok.xml (97%) rename {app => core}/src/main/res/drawable-mdpi/icon_home_profile.png (100%) rename {app => core}/src/main/res/drawable-xhdpi/icon_home_profile.png (100%) rename {app => core}/src/main/res/drawable-xxhdpi/icon_home_profile.png (100%) rename {app => core}/src/main/res/drawable-xxxhdpi/icon_home_profile.png (100%) rename {app => core}/src/main/res/drawable/alert_border_error.xml (97%) rename {app => core}/src/main/res/drawable/alert_border_warning.xml (97%) rename {app => core}/src/main/res/drawable/ic_trending_flat_white_48dp.xml (100%) rename {app => core}/src/main/res/drawable/icon_home_profile.png (100%) create mode 100644 core/src/main/res/drawable/mdtp_material_button_background.xml create mode 100644 core/src/main/res/drawable/mdtp_material_button_selected.xml rename {app => core}/src/main/res/drawable/pillborder.xml (100%) create mode 100644 core/src/main/res/values/dimens.xml diff --git a/app/build.gradle b/app/build.gradle index b2cb9db72f..6289c5f27b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -269,7 +269,6 @@ dependencies { implementation "androidx.activity:activity-ktx:${activityVersion}" implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.google.android.material:material:1.1.0' - implementation 'com.wdullaer:materialdatetimepicker:4.2.3' implementation "io.reactivex.rxjava2:rxandroid:2.1.1" diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt index 0100ca69dc..47651ef9ac 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt @@ -198,13 +198,7 @@ class ActionsFragment : DaggerFragment() { val pump = activePlugin.activePump actions_temptarget?.visibility = (profile != null).toVisibility() - actions_canceltempbasal.visibility = (profile == null).toVisibility() - actions_settempbasal.visibility = (profile == null).toVisibility() - actions_fill.visibility = (profile == null).toVisibility() - actions_extendedbolus.visibility = (profile == null).toVisibility() - actions_extendedbolus_cancel.visibility = (profile == null).toVisibility() - actions_historybrowser.visibility = (profile == null).toVisibility() - actions_tddstats.visibility = (profile == null).toVisibility() + actions_historybrowser.visibility = (profile != null).toVisibility() val basalProfileEnabled = buildHelper.isEngineeringModeOrRelease() && pump.pumpDescription.isSetBasalProfileCapable diff --git a/app/src/main/res/layout/actions_fragment.xml b/app/src/main/res/layout/actions_fragment.xml index cf17417b72..588bde9ab8 100644 --- a/app/src/main/res/layout/actions_fragment.xml +++ b/app/src/main/res/layout/actions_fragment.xml @@ -280,7 +280,7 @@ app:layout_column="0" app:layout_columnWeight="1" app:layout_gravity="fill" - app:layout_row="4" /> + app:layout_row="6" /> + app:layout_row="6" /> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 9bfd6aa1a9..a2b72f3f49 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -70,13 +70,6 @@ #2E2E2E - #666666 - #ffffff - #77dd77 - #ff0400 - #FF8C00 - #03A9F4 - #77dd77 #FF8C00 #FF5555 diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index b650a33ce6..8542005550 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,8 +1,2 @@ - - 16dp - 16dp - 30dp - 16dp - 8dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c0383d967b..63a2c9a8e5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -73,13 +73,6 @@ Show information about your loop on your xDrip+ watchface. Remote control AndroidAPS using SMS commands. - Units - DIA - IC - ISF - Basal - Target - NO PROFILE SET Insulin: Carbs: IOB: @@ -165,7 +158,6 @@ Bolus: Basal Basal: - Carbs Change your input! BG Source Where should AndroidAPS gain it\'s data from? @@ -311,7 +303,6 @@ DanaR profile settings DIA [h] Duration of Insulin Activity - Reload Uploading E bolus DS bolus @@ -328,8 +319,6 @@ Pump password Bolus stopped Stopping bolus - Stop - STOP PRESSED Loop has been disabled Loop has been enabled Loop is disabled @@ -591,7 +580,6 @@ Sensor age Canula age Insulin age - Invalid profile !!! Do Profile Switch Pump battery age Alarm options @@ -670,7 +658,6 @@ Ultra-Rapid Oref DIA of %1$f too short - using %2$f instead! Activate profile - Date INVALID Pairing Selected pump diff --git a/app/src/main/res/drawable-hdpi/background_darkgray.xml b/core/src/main/res/drawable-hdpi/background_darkgray.xml similarity index 100% rename from app/src/main/res/drawable-hdpi/background_darkgray.xml rename to core/src/main/res/drawable-hdpi/background_darkgray.xml diff --git a/app/src/main/res/drawable-hdpi/border_gray.xml b/core/src/main/res/drawable-hdpi/border_gray.xml similarity index 100% rename from app/src/main/res/drawable-hdpi/border_gray.xml rename to core/src/main/res/drawable-hdpi/border_gray.xml diff --git a/app/src/main/res/drawable-hdpi/icon_home_profile.png b/core/src/main/res/drawable-hdpi/icon_home_profile.png similarity index 100% rename from app/src/main/res/drawable-hdpi/icon_home_profile.png rename to core/src/main/res/drawable-hdpi/icon_home_profile.png diff --git a/app/src/main/res/drawable/toast_border_ok.xml b/core/src/main/res/drawable-hdpi/toast_border_ok.xml similarity index 97% rename from app/src/main/res/drawable/toast_border_ok.xml rename to core/src/main/res/drawable-hdpi/toast_border_ok.xml index 1c62848b31..c16b59d200 100644 --- a/app/src/main/res/drawable/toast_border_ok.xml +++ b/core/src/main/res/drawable-hdpi/toast_border_ok.xml @@ -1,12 +1,12 @@ - - - - - - - + + + + + + + diff --git a/app/src/main/res/drawable-mdpi/icon_home_profile.png b/core/src/main/res/drawable-mdpi/icon_home_profile.png similarity index 100% rename from app/src/main/res/drawable-mdpi/icon_home_profile.png rename to core/src/main/res/drawable-mdpi/icon_home_profile.png diff --git a/app/src/main/res/drawable-xhdpi/icon_home_profile.png b/core/src/main/res/drawable-xhdpi/icon_home_profile.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/icon_home_profile.png rename to core/src/main/res/drawable-xhdpi/icon_home_profile.png diff --git a/app/src/main/res/drawable-xxhdpi/icon_home_profile.png b/core/src/main/res/drawable-xxhdpi/icon_home_profile.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/icon_home_profile.png rename to core/src/main/res/drawable-xxhdpi/icon_home_profile.png diff --git a/app/src/main/res/drawable-xxxhdpi/icon_home_profile.png b/core/src/main/res/drawable-xxxhdpi/icon_home_profile.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/icon_home_profile.png rename to core/src/main/res/drawable-xxxhdpi/icon_home_profile.png diff --git a/app/src/main/res/drawable/alert_border_error.xml b/core/src/main/res/drawable/alert_border_error.xml similarity index 97% rename from app/src/main/res/drawable/alert_border_error.xml rename to core/src/main/res/drawable/alert_border_error.xml index d1bcae1348..310604bdea 100644 --- a/app/src/main/res/drawable/alert_border_error.xml +++ b/core/src/main/res/drawable/alert_border_error.xml @@ -1,15 +1,15 @@ - - - - - - - - + + + + + + + + diff --git a/app/src/main/res/drawable/alert_border_warning.xml b/core/src/main/res/drawable/alert_border_warning.xml similarity index 97% rename from app/src/main/res/drawable/alert_border_warning.xml rename to core/src/main/res/drawable/alert_border_warning.xml index c73a9517a5..6c6feeafe2 100644 --- a/app/src/main/res/drawable/alert_border_warning.xml +++ b/core/src/main/res/drawable/alert_border_warning.xml @@ -1,15 +1,15 @@ - - - - - - - - + + + + + + + + diff --git a/app/src/main/res/drawable/ic_trending_flat_white_48dp.xml b/core/src/main/res/drawable/ic_trending_flat_white_48dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_trending_flat_white_48dp.xml rename to core/src/main/res/drawable/ic_trending_flat_white_48dp.xml diff --git a/app/src/main/res/drawable/icon_home_profile.png b/core/src/main/res/drawable/icon_home_profile.png similarity index 100% rename from app/src/main/res/drawable/icon_home_profile.png rename to core/src/main/res/drawable/icon_home_profile.png diff --git a/core/src/main/res/drawable/mdtp_material_button_background.xml b/core/src/main/res/drawable/mdtp_material_button_background.xml new file mode 100644 index 0000000000..f70c39c0cf --- /dev/null +++ b/core/src/main/res/drawable/mdtp_material_button_background.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/core/src/main/res/drawable/mdtp_material_button_selected.xml b/core/src/main/res/drawable/mdtp_material_button_selected.xml new file mode 100644 index 0000000000..1733e2d3ea --- /dev/null +++ b/core/src/main/res/drawable/mdtp_material_button_selected.xml @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/pillborder.xml b/core/src/main/res/drawable/pillborder.xml similarity index 100% rename from app/src/main/res/drawable/pillborder.xml rename to core/src/main/res/drawable/pillborder.xml diff --git a/core/src/main/res/layout/danar_statsactivity.xml b/core/src/main/res/layout/danar_statsactivity.xml index d4320c05f2..d26170b128 100644 --- a/core/src/main/res/layout/danar_statsactivity.xml +++ b/core/src/main/res/layout/danar_statsactivity.xml @@ -5,17 +5,7 @@ android:layout_height="fill_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingTop="@dimen/activity_vertical_margin" - tools:context=".plugins.pump.danaR.activities.DanaRHistoryActivity"> - - - - + tools:context="info.nightscout.androidaps.activities.TDDStatsActivity"> + android:orientation="horizontal" + android:baselineAligned="false"> + android:text="@string/reload" /> diff --git a/core/src/main/res/layout/dialog_alert_custom.xml b/core/src/main/res/layout/dialog_alert_custom.xml index f006387d28..312be67ac7 100644 --- a/core/src/main/res/layout/dialog_alert_custom.xml +++ b/core/src/main/res/layout/dialog_alert_custom.xml @@ -28,8 +28,8 @@ android:layout_height="wrap_content" android:layout_centerInParent="true" android:layout_gravity="center" - android:layout_marginLeft="2dp" - android:layout_marginRight="50dp" + android:layout_marginStart="2dp" + android:layout_marginEnd="50dp" android:layout_toEndOf="@id/alertdialog_icon" android:textAlignment="center" android:textAppearance="?android:attr/textAppearanceLarge" diff --git a/core/src/main/res/layout/dialog_bolusprogress.xml b/core/src/main/res/layout/dialog_bolusprogress.xml index e2da43a067..ccf02258f9 100644 --- a/core/src/main/res/layout/dialog_bolusprogress.xml +++ b/core/src/main/res/layout/dialog_bolusprogress.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - tools:context=".dialogs.BolusProgressDialog" + tools:context="info.nightscout.androidaps.dialogs.BolusProgressDialog" > + tools:context="info.nightscout.androidaps.dialogs.ProfileViewerDialog"> @@ -27,18 +27,16 @@ android:id="@+id/cancel" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:layout_marginRight="8dp" android:layout_marginEnd="8dp" style="@style/mdtp_ActionButton.Text" - android:text="@string/mdtp_cancel" /> + android:text="@string/cancel" />