Designing Your User interface Using Views:
"In Android UI consists of view the viewGroups are divided into following categories."
➤➤ Basic views — Commonly used views such as the TextView, EditText, and Button
views
➤➤ Picker views — Views that enable users to select from a list, such as the TimePicker
and DatePicker views
➤➤ List views — Views that display a long list of items, such as the ListView and the
SpinnerView views
BASIC VIEWS:
"The basic views enable you to display text information, as well as perform some basic selection.To get started, let’s explore some of the basic views that you can use to design the UI of your Android applications:"
➤➤ TextView
➤➤ EditText
➤➤ Button
➤➤ ImageButton
➤➤ CheckBox
➤➤ ToggleButton
➤➤ RadioButton
➤➤ RadioGroup
The following sections explore all these views in more detail.
TextView view :"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, which is discussed in the next section."
When you create a new Android project, Eclipse always creates the main.xml fi le (located in the res/
layout folder), which contains a <TextView> element:
exj-
<?xml version=”1.0” encoding=”utf-8”?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:orientation=”vertical”
android:layout_width=”fill_parent”
android:layout_height=”fill_parent”
>
<TextView
android:layout_width=”fill_parent”
android:layout_height=”wrap_content”
android:text=”@string/hello”
/>
</LinearLayout>