Module ui.widget.infomessage

Widget that displays an informational message.

It vanishes on key press or after a given timeout.

Example:

local InfoMessage = require("ui/widget/infomessage")
local UIManager = require("ui/uimanager")
local _ = require("gettext")
local Screen = require("device").screen
local sample
sample = InfoMessage:new{
    text = _("Some message"),
    -- Usually the hight of a InfoMessage is self-adaptive. If this field is actively set, a
    -- scrollbar may be shown. This variable is usually helpful to display a large chunk of text
    -- which may exceed the height of the screen.
    height = Screen:scaleBySize(400),
    -- Set to false to hide the icon, and also the span between the icon and text.
    show_icon = false,
    timeout = 5,  -- This widget will vanish in 5 seconds.
}
UIManager:show(sample)



generated by LDoc 1.5.0 Last updated 2024-04-18 11:30:11