---
title: "Text View in android"  
description: "Before we started with android studio Application(App) building I want to describe the structure of APP and requirement"  
author: "Nitish Kesarwani"  
published: 2017-12-14  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/12722/text-view-in-android  
category: "android apps"  
tags: ["android", "java", "android-studio"]  
reading_time: 2 minutes  

---

# Text View in android

##### Activity

Activity is an interface program which establishes the [coordination](https://answers.mindstick.com/qa/72258/who-was-launching-a-new-scheme-indian-cyber-crime-coordination-centre-i4c-to-combat-cybercrime-in-the-country) with the programme when user click, touch scroll etc.It is like AWT or Swing program in java.It is the main class in Java, C++, C, and subclass of ContextThemeWrapper Class.

##### Services

Services are the [operation](https://yourviews.mindstick.com/view/83916/why-is-it-necessary-to-sterilize-operation-theater) that is running in the [background](https://www.mindstick.com/articles/65/how-to-change-background-color-of-tab-control-in-c-sharp) without the user [permission](https://answers.mindstick.com/qa/33390/how-to-enable-api-access-in-salesforce-by-permission-set) even it is executed when the [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) is destroyed.

##### Broadcast

It performs [communication](https://www.mindstick.com/articles/126321/5-fails-and-fixes-of-the-office-communication) with another application or System which are broadcasted message occur on Android.

##### Content Provider

[content provider](https://www.mindstick.com/interview/22953/explain-content-provider-in-android) [component](https://www.mindstick.com/articles/12262/learn-how-to-make-a-component-in-magento-2) supplies the data from an application according to the request. This request is handled by ContentResolver class.

```
    <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.mapsample.msclient009.apps.MainActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:text="Hello Robot "
            android:textAlignment="center"
            android:textColor="#F1AD33"
            android:textSize="30dp"/>
    </LinearLayout>

</android.support.constraint.ConstraintLayout>
```

It is layout file in which all component is added such as Button, TextView, TextBox etc.it is residing under res>>Layout directories(folder).

###### MainActivity.java

```
package com.mapsample.msclient009.apps;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

 public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
    }
}
```

it is java in which layout added in ActivityMain.[xml file](https://www.mindstick.com/articles/75/how-to-read-and-write-xml-file-through-c-sharp) can be viewed through findviewById(R.id.Id_name) declared in layout.

###### AndroidManifest.xml

```
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mapsample.msclient009.apps">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
```

This file contains a component which you want to add should be declared such as Services, Activity, [Broadcast](https://www.mindstick.com/articles/1633/broadcastreceiver-in-android), Intent.It resides inside Manifest directory.

![Text View in android](https://www.mindstick.com/mindstickarticle/c53fb062-02ed-440a-9cef-fa30254340ae/images/6919a493-f196-45bc-941b-6f3e322997f3.png)\

\

\

---

Original Source: https://www.mindstick.com/articles/12722/text-view-in-android

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
