1.. _lv_tileview: 2 3======================= 4Tile View (lv_tileview) 5======================= 6 7 8Overview 9******** 10 11The Tile View is a container Widget whose elements (called *tiles*) can 12be arranged in grid form. A user can navigate between the tiles by 13swiping. Any direction of swiping can be disabled on the tiles 14individually to not allow moving from one tile to another. 15 16If the Tile View is screen sized, the user interface resembles what you 17may have seen on smartwatches. 18 19 20 21.. _lv_tileview_parts_and_styles: 22 23Parts and Styles 24**************** 25 26The Tile View is built from a :ref:`base_widget` container and 27:ref:`base_widget` tiles. 28 29The parts and styles work the same as for :ref:`base_widget`. 30 31 32 33.. _lv_tileview_usage: 34 35Usage 36***** 37 38Add a tile 39---------- 40 41:cpp:expr:`lv_tileview_add_tile(tileview, col_id, row_id, dir)` creates a new 42tile on the ``col_id``\ -th column and ``row_id``\ -th row. ``dir`` can be 43``LV_DIR_LEFT/RIGHT/TOP/BOTTOM/HOR/VER/ALL`` or OR-ed values to enable 44moving to the adjacent tiles in the given direction by swiping. 45 46The returned value is a pointer to the tile (a :ref:`base_widget`) on which the 47content of the tab can be created. 48 49Change tile 50----------- 51 52The Tile View can scroll to a specified tile with 53:cpp:expr:`lv_tileview_set_tile(tileview, tile, LV_ANIM_ON/OFF)` or 54:cpp:expr:`lv_tileview_set_tile_by_index(tileview, col_id, row_id, LV_ANIM_ON/OFF)`. 55 56 57 58.. _lv_tileview_events: 59 60Events 61****** 62 63- :cpp:enumerator:`LV_EVENT_VALUE_CHANGED` Sent after a new tile is displayed by scrolling. 64 :cpp:expr:`lv_tileview_get_tile_active(tabview)` can be used within the event to 65 get a pointer to the newly-displayed tile. 66 67.. admonition:: Further Reading 68 69 Learn more about :ref:`lv_obj_events` emitted by all Widgets. 70 71 Learn more about :ref:`events`. 72 73 74 75.. _lv_tileview_keys: 76 77Keys 78**** 79 80No *Keys* are processed by Tileview Widgets. 81 82.. admonition:: Further Reading 83 84 Learn more about :ref:`indev_keys`. 85 86 87 88.. _lv_tileview_example: 89 90Example 91******* 92 93.. include:: ../../examples/widgets/tileview/index.rst 94 95 96 97.. _lv_tileview_api: 98 99API 100*** 101