From fe5cc3d3341089b6cc3eff9e80798c7d9c0f8bcf Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 19 Oct 2020 19:24:33 +0200 Subject: [PATCH] layouts -> AppCompat --- .../objectives/ObjectivesPlugin.kt | 1 - .../general/maintenance/ImportExportPrefs.kt | 4 ++-- .../main/res/layout/activity_setupwizard.xml | 2 +- .../res/layout/automation_action_item.xml | 2 +- .../res/layout/automation_dialog_action.xml | 3 ++- .../automation_dialog_choose_action.xml | 3 ++- .../automation_dialog_choose_trigger.xml | 3 ++- .../layout/automation_dialog_edit_trigger.xml | 3 ++- .../res/layout/automation_dialog_event.xml | 6 +++--- .../main/res/layout/automation_event_item.xml | 2 +- app/src/main/res/layout/bgsource_item.xml | 2 +- .../layout/configbuilder_single_plugin.xml | 2 +- app/src/main/res/layout/datetime.xml | 2 +- .../main/res/layout/dialog_calibration.xml | 5 +++-- app/src/main/res/layout/dialog_carbs.xml | 9 +++++---- app/src/main/res/layout/dialog_care.xml | 7 ++++--- .../main/res/layout/dialog_extendedbolus.xml | 7 ++++--- app/src/main/res/layout/dialog_fill.xml | 3 ++- app/src/main/res/layout/dialog_insulin.xml | 7 ++++--- .../main/res/layout/dialog_profileswitch.xml | 13 ++++++------ app/src/main/res/layout/dialog_tempbasal.xml | 9 +++++---- app/src/main/res/layout/dialog_temptarget.xml | 9 +++++---- app/src/main/res/layout/dialog_treatment.xml | 7 ++++--- app/src/main/res/layout/dialog_wizard.xml | 17 ++++++++-------- app/src/main/res/layout/dialog_wizardinfo.xml | 3 ++- .../main/res/layout/import_summary_item.xml | 5 +++-- .../main/res/layout/localprofile_fragment.xml | 7 ++++--- .../layout/maintenance_importlist_item.xml | 6 +++--- app/src/main/res/layout/notes.xml | 2 +- .../overview_editquickwizard_dialog.xml | 20 +++++++++---------- .../overview_fragment_nsclient_tablet.xml | 2 +- .../main/res/layout/overview_info_layout.xml | 12 +++++------ .../layout/overview_quickwizardlist_item.xml | 10 +++++----- .../layout/overview_statuslights_layout.xml | 11 +++++----- .../main/res/layout/timelistedit_element.xml | 5 +++-- .../layout/timelistedit_element_vertical.xml | 5 +++-- .../main/res/layout/dialog_bolusprogress.xml | 3 ++- core/src/main/res/layout/dialog_error.xml | 3 ++- .../main/res/layout/dialog_profileviewer.xml | 3 ++- core/src/main/res/layout/toast.xml | 3 ++- .../main/res/layout/danar_historyactivity.xml | 3 ++- .../layout/danar_user_options_activity.xml | 3 ++- .../res/layout/danars_blescanner_activity.xml | 3 ++- .../res/layout/danars_enter_pin_activity.xml | 3 ++- .../layout/danars_pairingprogressdialog.xml | 3 ++- .../omnipod_wizard_action_page_fragment.xml | 3 ++- 46 files changed, 138 insertions(+), 108 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesPlugin.kt index fcf77f9b6c..1c33eb7a2f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesPlugin.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.plugins.constraints.objectives -import android.app.Activity import androidx.fragment.app.FragmentActivity import com.google.common.base.Charsets import com.google.common.hash.Hashing diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefs.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefs.kt index 1ad7099031..e63960b9fc 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefs.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefs.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.general.maintenance import android.Manifest -import android.app.Activity +import androidx.appcompat.app.AppCompatActivity import android.bluetooth.BluetoothAdapter import android.content.Context import android.content.Intent @@ -344,7 +344,7 @@ class ImportExportPrefs @Inject constructor( show(context, resourceHelper.gs(R.string.setting_imported), resourceHelper.gs(R.string.restartingapp), Runnable { log.debug(TAG, "Exiting") rxBus.send(EventAppExit()) - if (context is Activity) { + if (context is AppCompatActivity) { context.finish() } System.runFinalization() diff --git a/app/src/main/res/layout/activity_setupwizard.xml b/app/src/main/res/layout/activity_setupwizard.xml index 1a9a7aad94..dc0a0c2e81 100644 --- a/app/src/main/res/layout/activity_setupwizard.xml +++ b/app/src/main/res/layout/activity_setupwizard.xml @@ -31,7 +31,7 @@ android:layout_weight="1" android:text="@string/exit" android:onClick="exitPressed" - android:textAppearance="@android:style/TextAppearance.Material.Medium" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textStyle="bold" /> diff --git a/app/src/main/res/layout/automation_action_item.xml b/app/src/main/res/layout/automation_action_item.xml index 539ce1a400..5c66c86e5a 100644 --- a/app/src/main/res/layout/automation_action_item.xml +++ b/app/src/main/res/layout/automation_action_item.xml @@ -36,7 +36,7 @@ android:id="@+id/automation_action_image" android:layout_width="24dp" android:layout_height="24dp" - android:src="@drawable/ic_action_orange_48dp" /> + app:srcCompat="@drawable/ic_action_orange_48dp" /> + app:srcCompat="@drawable/ic_action_orange_48dp" /> + app:srcCompat="@drawable/ic_action_orange_48dp" /> + app:srcCompat="@drawable/ic_trigger_green_48dp" /> + app:srcCompat="@drawable/ic_trigger_green_48dp" /> + app:srcCompat="@drawable/ic_action_orange_48dp" /> + app:srcCompat="@drawable/ic_trigger_green_48dp" /> + app:srcCompat="@drawable/ic_action_orange_48dp" /> + app:srcCompat="@drawable/ic_reorder_gray_24dp" /> + card_view:srcCompat="@drawable/ic_flat" /> diff --git a/app/src/main/res/layout/dialog_calibration.xml b/app/src/main/res/layout/dialog_calibration.xml index 5b298a0db5..d236cd6a1a 100644 --- a/app/src/main/res/layout/dialog_calibration.xml +++ b/app/src/main/res/layout/dialog_calibration.xml @@ -1,5 +1,6 @@ + app:srcCompat="@drawable/ic_calibration" /> + app:srcCompat="@drawable/ic_cp_bolus_carbs" /> + app:srcCompat="@drawable/ic_actions_profileswitch" /> + app:srcCompat="@drawable/ic_actions_startextbolus" /> + app:srcCompat="@drawable/ic_cp_pump_canula" /> + app:srcCompat="@drawable/ic_bolus" /> + app:srcCompat="@drawable/ic_actions_profileswitch" />