当前位置:网站首页>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
}
运行效果
边栏推荐
- The implementation of OSD on rk1126 platform supports color translucency and multi-channel support for Chinese
- Visual Studio调试方式详解
- Chapter 17 process memory
- Rich text editing: wangeditor tutorial
- LVGL 8.2 Menu
- Nowcoder rearrange linked list
- MATLAB中tiledlayout函数使用
- 为什么图片传输要使用base64编码
- Practical puzzle solving | how to extract irregular ROI regions in opencv
- 去除重复字母[贪心+单调栈(用数组+len来维持单调序列)]
猜你喜欢
去除重复字母[贪心+单调栈(用数组+len来维持单调序列)]
The failure rate is as high as 80%. What are the challenges on the way of enterprise digital transformation?
Incremental ternary subsequence [greedy training]
实时数据仓库
Leetcode 61: 旋转链表
实战解惑 | OpenCV中如何提取不规则ROI区域
Data center concept
RK1126平台OSD的实现支持颜色半透明度多通道支持中文
软件测试之测试评估
How to package QT and share exe
随机推荐
ML之shap:基于boston波士顿房价回归预测数据集利用Shap值对LiR线性回归模型实现可解释性案例
How to operate and invest games on behalf of others at sea
R language ggplot2 visualization: gganimate package creates animated graph (GIF) and uses anim_ The save function saves the GIF visual animation
基于51单片机的超声波测距仪
递增的三元子序列[贪心训练]
What is the difference between Bi financial analysis in a narrow sense and financial analysis in a broad sense?
【算法leetcode】面试题 04.03. 特定深度节点链表(多语言实现)
Gin integrated Alipay payment
Industrial Internet has greater development potential and more industry scenarios
实时数据仓库
leetcode:6110. The number of incremental paths in the grid graph [DFS + cache]
Nowcoder reverse linked list
MySQL的触发器
MySQL triggers
92.(cesium篇)cesium楼栋分层
2022 game going to sea practical release strategy
[information retrieval] link analysis
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
(1)性能调优的标准和做好调优的正确姿势-有性能问题,上HeapDump性能社区!
opencv3.2 和opencv2.4安装