acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
tileview.md (1658B)
1 ```eval_rst 2 .. include:: /header.rst 3 :github_url: |github_link_base|/widgets/extra/tileview.md 4 ``` 5 # Tile view (lv_tileview) 6 7 ## Overview 8 9 The Tile view is a container object whose elements (called *tiles*) can be arranged in grid form. 10 A user can navigate between the tiles by swiping. 11 Any direction of swiping can be disabled on the tiles individually to not allow moving from one tile to another. 12 13 If the Tile view is screen sized, the user interface resembles what you may have seen on smartwatches. 14 15 ## Parts and Styles 16 The Tile view is built from an [lv_obj](/widgets/obj) container and [lv_obj](/widgets/obj) tiles. 17 18 The parts and styles work the same as for [lv_obj](/widgets/obj). 19 20 ## Usage 21 22 ### Add a tile 23 24 `lv_tileview_add_tile(tileview, row_id, col_id, dir)` creates a new tile on the `row_id`th row and `col_id`th column. 25 `dir` can be `LV_DIR_LEFT/RIGHT/TOP/BOTTOM/HOR/VER/ALL` or OR-ed values to enable moving to the adjacent tiles into the given direction by swiping. 26 27 The returned value is an `lv_obj_t *` on which the content of the tab can be created. 28 29 ### Change tile 30 The Tile view can scroll to a tile with `lv_obj_set_tile(tileview, tile_obj, LV_ANIM_ON/OFF)` or `lv_obj_set_tile_id(tileviewv, col_id, row_id, LV_ANIM_ON/OFF);` 31 32 33 ## Events 34 - `LV_EVENT_VALUE_CHANGED` Sent when a new tile loaded by scrolling. `lv_tileview_get_tile_act(tabview)` can be used to get current tile. 35 36 ## Keys 37 *Keys* are not handled by the Tile view. 38 39 Learn more about [Keys](/overview/indev). 40 41 ## Example 42 43 44 ```eval_rst 45 46 .. include:: ../../../examples/widgets/tileview/index.rst 47 48 ``` 49 50 51 ## API 52 53 ```eval_rst 54 55 .. doxygenfile:: lv_tileview.h 56 :project: lvgl 57 58 ```