当前位置:网站首页>LVLG 8.2 circular scrolling animation of a label
LVLG 8.2 circular scrolling animation of a label
2022-07-04 13:07:00 【仙剑情缘】
创建自定义circular scrolling文本滚动效果
static void lv_example_label_5(void)
{
static lv_anim_t animation_template; /动画变量定义
static lv_style_t label_style;
lv_anim_init(&animation_template);
lv_anim_set_delay(&animation_template, 1000); //设置等待1秒开始动画
lv_anim_set_repeat_delay(&animation_template,
3000); // 动画回到初时位置后延时3秒重复滚动
/*Initialize the label style with the animation template*/
lv_style_init(&label_style);
lv_style_set_anim(&label_style, &animation_template); // sytle关联动画变量
lv_obj_t* label1 = lv_label_create(lv_scr_act()); //创建label
lv_label_set_long_mode(label1, LV_LABEL_LONG_SCROLL_CIRCULAR); //Circular scroll模式
lv_obj_set_width(label1, 150); // 设置宽度
lv_label_set_text(label1, "It is a circularly scrolling text. ");//设置文本内容
lv_obj_align(label1, LV_ALIGN_CENTER, 0, 40);//LV_ALIGN_CENTER方式对齐
lv_obj_add_style(label1, &label_style, LV_STATE_DEFAULT); //label添加style
}
运行效果

边栏推荐
- [MySQL from introduction to proficiency] [advanced chapter] (IV) MySQL permission management and control
- 富文本编辑:wangEditor使用教程
- Rich text editing: wangeditor tutorial
- LVGL 8.2 keyboard
- Some problems and ideas of data embedding point
- Leetcode T48:旋转图像
- Codeforce:c. sum of substrings
- Ml: introduction, principle, use method and detailed introduction of classic cases of snap value
- Practical puzzle solving | how to extract irregular ROI regions in opencv
- 【算法leetcode】面试题 04.03. 特定深度节点链表(多语言实现)
猜你喜欢

Scratch Castle Adventure Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022

Leetcode 61: 旋转链表

实时数据仓库

Digi XBee 3 RF: 4个协议,3种封装,10个大功能

电商系统中红包活动设计

NowCoder 反转链表

开发中常见问题总结

Explain of SQL optimization

LVGL 8.2 Line

The implementation of OSD on rk1126 platform supports color translucency and multi-channel support for Chinese
随机推荐
Leetcode T47: 全排列II
Why should Base64 encoding be used for image transmission
Nowcoder rearrange linked list
递增的三元子序列[贪心训练]
STM32F1与STM32CubeIDE编程实例-MAX7219驱动8位7段数码管(基于GPIO)
A collection of classic papers on convolutional neural networks (deep learning classification)
WT588F02B-8S(C006_03)单芯片语音ic方案为智能门铃设计降本增效赋能
R language dplyr package summary_ If function calculates the mean and median of all numerical data columns in dataframe data, and summarizes all numerical variables based on conditions
Excel quickly merges multiple rows of data
How to operate and invest games on behalf of others at sea
Leetcode T48:旋转图像
迅为IMX6Q开发板QT系统移植tinyplay
聊聊保证线程安全的 10 个小技巧
【MySQL从入门到精通】【高级篇】(四)MySQL权限管理与控制
How to package QT and share exe
LVGL 8.2 Line
Map of mL: Based on Boston house price regression prediction data set, an interpretable case is realized by using the map value to the LIR linear regression model
富文本编辑:wangEditor使用教程
Solutions aux problèmes d'utilisation de l'au ou du povo 2 dans le riz rouge k20pro MIUI 12.5
[information retrieval] experiment of classification and clustering