From 92b461a28f7a168dd3e5d26f8502a2bcc1359b71 Mon Sep 17 00:00:00 2001 From: Philoul Date: Tue, 22 Aug 2023 08:46:31 +0200 Subject: [PATCH] Wear cwf Include number of locked watch pref in wf selection --- .../CustomWatchfaceImportListActivity.kt | 2 ++ .../layout/custom_watchface_import_list_item.xml | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/plugins/configuration/src/main/java/info/nightscout/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt b/plugins/configuration/src/main/java/info/nightscout/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt index 78f686dab1..780eae0d9e 100644 --- a/plugins/configuration/src/main/java/info/nightscout/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt +++ b/plugins/configuration/src/main/java/info/nightscout/configuration/maintenance/activities/CustomWatchfaceImportListActivity.kt @@ -103,6 +103,8 @@ class CustomWatchfaceImportListActivity: TranslatedDaggerAppCompatActivity() { val colorAttr = if (checkCustomVersion(metadata)) info.nightscout.core.ui.R.attr.metadataTextOkColor else info.nightscout.core.ui.R.attr.metadataTextWarningColor cwfVersion.setTextColor(rh.gac(cwfVersion.context, colorAttr)) prefWarning.visibility = metadata.keys.any { it.isPref }.toVisibility() + cwfPrefNumber.text = "${metadata.count { it.key.isPref }}" + cwfPrefNumber.visibility=prefWarning.visibility } } } diff --git a/plugins/configuration/src/main/res/layout/custom_watchface_import_list_item.xml b/plugins/configuration/src/main/res/layout/custom_watchface_import_list_item.xml index a8ae30ed0f..6e879f9ab9 100644 --- a/plugins/configuration/src/main/res/layout/custom_watchface_import_list_item.xml +++ b/plugins/configuration/src/main/res/layout/custom_watchface_import_list_item.xml @@ -124,11 +124,24 @@ android:textColor="?attr/importListFileNameColor" android:textSize="11sp" /> + +