added lv_obj_move_up() and lv_obj_move_down() (#2467)

* - small with unneeded lv_obj_invalidate()  fix in lv_obj_move_foreground() and lv_obj_move_background()

- added lv_obj_move_up() and lv_obj_move_down()
- used new functions in sample 2
- used lv_obj_swap() to shuffle (turn around) list

* solved build error

* added top and bottom buttons in sample
This commit is contained in:
Karijn Wessing
2021-08-24 14:30:38 +02:00
committed by GitHub
parent 6a5c0b4a70
commit e111ea2a62
6 changed files with 131 additions and 18 deletions

View File

@@ -69,6 +69,8 @@ for(i = 0; i < lv_obj_get_child_cnt(parent); i++) {
You can bring an object to the foreground or send it to the background with `lv_obj_move_foreground(obj)` and `lv_obj_move_background(obj)`.
You can move an object one position up or down in the hierargy with `lv_obj_move_up(obj)` and `lv_obj_move_down(obj)`.
You can swap the position of two objects with `lv_obj_swap(obj1, obj2)`.
### Screens