Function
This component is implemented by using the global variable #steps_value. You can reference #steps_value through the <Text> tag to display the step count. This component is available only in EMUI 10.1.0.160 and later versions (supported versions may vary according to the device model). In other versions, the variable value is 0, and you are advised not to display step counts.
Scenarios
- Display different medals for different values of #steps_value, for example, display the Health-Conscious Medal when the value reaches 10000.
- Display images of landscape at different altitudes for different values of #steps_value.
- Display images of food with different calories for different values of #steps_value, for example, display a bag of potato chips when the value reaches 5000.
- Display different growth stages of a plant for different values of #steps_value.
Examples
Use format and paras to display the current step count.
<Text x="100" y="1500" format="Current step count: %d" paras="#steps_value" size="50" color="#ff000000" visibility="ifelse(#steps_value,1,0)"/>