45.1 Overview

Text class creates widgets that display one or more lines of text, pretty similar to what widgets of Label class do. A difference is that Text class supports multiple lines of text as well as frames around the text and widgets created by Text class are resizable whereas Label class creates non-sizeable widgets.

Please note that Text class supports neither automatic word wrapping nor text formatting. If you want to have these features, you have to use Textview class instead. See Textview class for details.

Here is an example of how to use the <text> tag in XML:

<text>Hello World</text>

Show TOC