now, I have already written the code for this widget,How do I add it to LVGL
Hi,
Do you mean to contribute with your code?
If your please describe your widget in more detail.
yes, I want to Contribute code for lvgl
This widget (called naviview
)functions like tileview
, but has the following advantages:
- insert and delete elements dynamically
- relationships between elements can be dynamically modified
- elements can circular scrolling
- late feature extension is easy
Why am I writing this widget:
-
tileview
widget have weaker features- how to insert and delete elements dynamically
- how to dynamically change relationships between elements.
-
tileview
not circular scrolling -
tileview
late feature extension is troublesome
The implementation details are as follows:
It consists of two parts:
-
naviitem
:Information about wrapping elements.Details seelv_naviitem_t
-
naviview_ext
:Information about elements control.Details seelv_naviview_ext_t
/*Data of naviview item*/
typedef struct _naviitem_handler{
lv_obj_t *obj;
struct _naviitem_handler *top;
struct _naviitem_handler *bottom;
struct _naviitem_handler *left;
struct _naviitem_handler *right;
}lv_naviitem_t;
/*Data of naviview*/
typedef struct{
lv_naviitem_t *current;
#if LV_USE_ANIMATION
uint16_t anim_time;
struct {
uint8_t enabled : 1;
uint8_t flashing : 1;
} edge_flash;
#endif
}lv_naviview_ext_t;
The diagram is as follows:
Hi, great! beautiful.
The basic features of the drag pattern are also implemented
I want to add the widget to LVGL,Why don’t you talk to me。@lvgl
i think… in holiday!!
Unfortunately @kisvegabor can’t always afford the time to check forum posts each day. He should respond to you within the next few days though.
Could you send a pull request to the LVGL repo to get the process started? It should go to the dev
branch as it’s a new feature.
That‘s so cool, i want to use it.
I’m so sorry for the late replay, @guoweilkd. Unfortunately, I have no time to develop LVGL, run discussions on GitHub and be active here at the same time. Besides I was on holiday too
So, your approach looks good and clear. As @embeddedt suggested, please send a PR on GitHub to see the details. I promise that I’ll replay much faster.
That looks really cool. I love the 2d scrolling. It reminds me of the Playstation4 menu bar. Is it possible to display 3 menu items while scrolling the middle one?
As more people make widgets it would be cool to have a plugin/add-on directory on the site where people can download additional widgets. It will help build the community and make it easier to find/share widgets without making the core library get bloated.
yes, I agree with you.And I think it needs to be prioritized.
In this respect, we should learn from the rtThread package.https://github.com/RT-Thread/
Everyone can contribute packages to LVGL, and the user can configure whether to use the widget via Menuconfig
At some point we can turn the repo I propose here into downloadable widgets.
@guoweilkd What happened to the implementation?
I also need circular scrolling.