当前位置:网站首页>LVLG 8.2 circular scrolling animation of a label
LVLG 8.2 circular scrolling animation of a label
2022-07-04 14:35:00 【Fairy sword love】
Create custom circular scrolling Text scrolling effect
static void lv_example_label_5(void)
{
static lv_anim_t animation_template; / Animation variable definition
static lv_style_t label_style;
lv_anim_init(&animation_template);
lv_anim_set_delay(&animation_template, 1000); // Set the wait 1 Seconds to start animation
lv_anim_set_repeat_delay(&animation_template,
3000); // Delay after the animation returns to the initial position 3 Second repeated scrolling
/*Initialize the label style with the animation template*/
lv_style_init(&label_style);
lv_style_set_anim(&label_style, &animation_template); // sytle Associate animation variables
lv_obj_t* label1 = lv_label_create(lv_scr_act()); // establish label
lv_label_set_long_mode(label1, LV_LABEL_LONG_SCROLL_CIRCULAR); //Circular scroll Pattern
lv_obj_set_width(label1, 150); // Set width
lv_label_set_text(label1, "It is a circularly scrolling text. ");// Set text content
lv_obj_align(label1, LV_ALIGN_CENTER, 0, 40);//LV_ALIGN_CENTER Alignment
lv_obj_add_style(label1, &label_style, LV_STATE_DEFAULT); //label add to style
}
Running effect
边栏推荐
- Compile oglpg-9th-edition source code with clion
- 關於miui12.5 紅米k20pro用au或者povo2出現問題的解决辦法
- 聊聊保证线程安全的 10 个小技巧
- LVGL 8.2 Line
- LVGL 8.2 Draw label with gradient color
- What is the difference between Bi financial analysis in a narrow sense and financial analysis in a broad sense?
- Learn kernel 3: use GDB to track the kernel call chain
- ML之shap:基于boston波士顿房价回归预测数据集利用Shap值对LiR线性回归模型实现可解释性案例
- 【云原生】我怎么会和这个数据库杠上了?
- redis 日常笔记
猜你喜欢
Codeforce:c. sum of substrings
Compile oglpg-9th-edition source code with clion
sql优化之查询优化器
Stm32f1 and stm32subeide programming example -max7219 drives 8-bit 7-segment nixie tube (based on GPIO)
Gin integrated Alipay payment
Transplant tinyplay for imx6q development board QT system
数据中台概念
商業智能BI財務分析,狹義的財務分析和廣義的財務分析有何不同?
ML之shap:基于boston波士顿房价回归预测数据集利用shap值对XGBoost模型实现可解释性案例
LVGL 8.2 text shadow
随机推荐
Leetcode 61: 旋转链表
(1)性能调优的标准和做好调优的正确姿势-有性能问题,上HeapDump性能社区!
Map of mL: Based on Boston house price regression prediction data set, an interpretable case of xgboost model using map value
Sqlserver functions, creation and use of stored procedures
【MySQL从入门到精通】【高级篇】(四)MySQL权限管理与控制
LVGL 8.2 Line wrap, recoloring and scrolling
Data center concept
Practical puzzle solving | how to extract irregular ROI regions in opencv
Matters needing attention in overseas game Investment Agency
LVGL 8.2 Line
Solutions aux problèmes d'utilisation de l'au ou du povo 2 dans le riz rouge k20pro MIUI 12.5
Learn kernel 3: use GDB to track the kernel call chain
第十七章 进程内存
C language book rental management system
ML之shap:基于boston波士顿房价回归预测数据集利用shap值对XGBoost模型实现可解释性案例
Explain of SQL optimization
【信息检索】分类和聚类的实验
商业智能BI财务分析,狭义的财务分析和广义的财务分析有何不同?
Node mongodb installation
Digi重启XBee-Pro S2C生产,有些差别需要注意