Textview customization in Sketchware
1 minute read
The properties of textview in Sketchware app can be modified in order to create desirable text output. Here is a description of the properties which can be modified.
- ID: This is name of the textview, and can be modified for ease of identification if we have many textviews.
- layout_width/layout height: They determine the width and height of the textview widget and can be set to match parent (where they occupy the space available), wrap content (where they change size to accommodate the contents), or to custom dp.
- padding: Determines the size of the area around the contents inside the border of textview.
- margin: Determines the size of the white space outside the border.
- gravity: Determines the orientation of texts inside Textview widget.
- layout_gravity: Determines the orientation of textview widget inside the container layout widget.
- weight: Weight is set to 0 by default. It can be increased to push other widgets to border and occupy remaining height.
- text: Here the text to be displayed in Textview can be written.
- text_size: Determines the size of the text.
- text_style: Display bold/italic/normal text.
- text_color: Changes color of text.
- single_line: This doesn't allow Textview widget to occupy more than one line to incorporate all it's contents.
- lines: Determines the number of lines in which text is to be displayed.
- background_resource: This allows an image to be set as background of textview.
- background_color: Changes background color of textview widget.
- rotate: It sets rotation of textview widget between 0 - 360 degrees.
- alpha: It's value is set as 1 by default and it can be reduced to change the opacity of the texts.