Tile view (lv_tileview)


The Tile view is a container object whose elements (called tiles) can be arranged in grid form. A user can navigate between the tiles by swiping. Any direction of swiping can be disabled on the tiles individually to not allow moving from one tile to another.

If the Tile view is screen sized, the user interface resembles what you may have seen on smartwatches.

Parts and Styles

The Tile view is built from an lv_obj container and lv_obj tiles.

The parts and styles work the same as for lv_obj.


Add a tile

lv_tileview_add_tile(tileview, row_id, col_id, dir) creates a new tile on the row_idth row and col_idth column. 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.

The returned value is an lv_obj_t * on which the content of the tab can be created.

Change tile

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);


  • 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.


Keys are not handled by the Tile view.

Learn more about Keys.




lv_obj_t *lv_tileview_create(lv_obj_t *parent)

Create a Tileview object


parent -- pointer to an object, it will be the parent of the new tileview


pointer to the created tileview

lv_obj_t *lv_tileview_add_tile(lv_obj_t *tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir)
void lv_obj_set_tile(lv_obj_t *tv, lv_obj_t *tile_obj, lv_anim_enable_t anim_en)
void lv_obj_set_tile_id(lv_obj_t *tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en)
lv_obj_t *lv_tileview_get_tile_act(lv_obj_t *obj)


const lv_obj_class_t lv_tileview_class
const lv_obj_class_t lv_tileview_tile_class
struct lv_tileview_t

Public Members

lv_obj_t obj
lv_obj_t *tile_act
struct lv_tileview_tile_t

Public Members

lv_obj_t obj
lv_dir_t dir