Hacker News new | ask | show | jobs
by konstmonst 1710 days ago
I really don't like internal memory management in such libraries. It should not be btn = lv.btn(lv.scr_act())

but

Button bt; lv.init_button(&bt)

so that I can decide where to keep the memory of button

1 comments

That is a convenience function. You can manage pointers to multiple screens yourself if desired. An LVGL "screen" is roughly equivalent to an Android activity. A complex UI may need to switch between multiple screens and it is often easier to just ignore lv_scr_act().