Module ui.widget.infomessage

Widget that displays an informational message.

It vanishes on key press or after a given timeout.


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.

generated by LDoc 1.4.6 Last updated 2017-10-08 14:57:40