当前位置:网站首页>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

边栏推荐
- C language programming
- MySQL stored procedure exercise
- A collection of classic papers on convolutional neural networks (deep learning classification)
- sql优化之查询优化器
- Wt588f02b-8s (c006_03) single chip voice IC scheme enables smart doorbell design to reduce cost and increase efficiency
- C language book rental management system
- Talk about 10 tips to ensure thread safety
- Visual Studio调试方式详解
- LVGL 8.2 Line
- redis 日常笔记
猜你喜欢

Detailed analysis of pytorch's automatic derivation mechanism, pytorch's core magic

LVGL 8.2 text shadow

统计php程序运行时间及设置PHP最长运行时间

【信息检索】分类和聚类的实验

基于51单片机的超声波测距仪

Alcohol driving monitoring system based on stm32+ Huawei cloud IOT design

Nowcoder reverse linked list

RK1126平台OSD的实现支持颜色半透明度多通道支持中文
![leetcode:6109. Number of people who know the secret [definition of DP]](/img/95/03e2606b249f26db052cf5075041c1.png)
leetcode:6109. Number of people who know the secret [definition of DP]

Excel quickly merges multiple rows of data
随机推荐
LVGL 8.2 LED
【C语言】指针笔试题
Ruiji takeout notes
R language uses the mutation function of dplyr package to standardize the specified data column (using mean function and SD function), and calculates the grouping mean of the standardized target varia
Practical puzzle solving | how to extract irregular ROI regions in opencv
Test process arrangement (2)
MySQL的存储过程练习题
A collection of classic papers on convolutional neural networks (deep learning classification)
Leetcode 61: 旋转链表
R language ggplot2 visualization: gganimate package creates animated graph (GIF) and uses anim_ The save function saves the GIF visual animation
架构方面的进步
Pandora IOT development board learning (RT thread) - Experiment 3 button experiment (learning notes)
数据中台概念
流行框架:Glide的使用
flink sql-client. SH tutorial
No servers available for service: xxxx
Opencv3.2 and opencv2.4 installation
使用CLion编译OGLPG-9th-Edition源码
Industrial Internet has greater development potential and more industry scenarios
Detailed index of MySQL