Wear cwf Include number of locked watch pref in wf selection
This commit is contained in:
parent
984767d80f
commit
92b461a28f
2 changed files with 16 additions and 1 deletions
|
@ -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
|
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))
|
cwfVersion.setTextColor(rh.gac(cwfVersion.context, colorAttr))
|
||||||
prefWarning.visibility = metadata.keys.any { it.isPref }.toVisibility()
|
prefWarning.visibility = metadata.keys.any { it.isPref }.toVisibility()
|
||||||
|
cwfPrefNumber.text = "${metadata.count { it.key.isPref }}"
|
||||||
|
cwfPrefNumber.visibility=prefWarning.visibility
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,11 +124,24 @@
|
||||||
android:textColor="?attr/importListFileNameColor"
|
android:textColor="?attr/importListFileNameColor"
|
||||||
android:textSize="11sp" />
|
android:textSize="11sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cwf_pref_number"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="0dp"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="?attr/warningColor"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/pref_warning"
|
android:id="@+id/pref_warning"
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="16dp"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_marginBottom="1dp"
|
android:layout_marginBottom="1dp"
|
||||||
|
|
Loading…
Reference in a new issue