What is TextView

Description

The TextView view is used to display text to the user. This is the most basic view and one that you will frequently use when you develop Android applications.

If you need to allow users to edit the text displayed, you should use the subclass of TextView, EditText.

In some other platforms, the TextView is commonly known as the label view. Its sole purpose is to display text on the screen.

Example

The following layout xml resource file has a definition for TextView.


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />

</LinearLayout>




















Home »
  Android »
    Android UI »




UI Basics
Action Bar
Animation
Button
Canvas
CheckBox
Clock Date Picker
Dialog
EditText
Event
Fragment
Gesture
GridView
ImageView
Layout
ListView
Map
Menu
Model
OpenGL
ProgressBar
RadioButton
Spinner
Tab
TextView
Thread
Toast
Video
View
WebView