title: android.widget.textview is deprecated
body: <p>I am writing Java code for an Android activity. I am facing the following warning message:</p>
  
  <blockquote>
    <p>android.widget.textview is deprecated</p>
  </blockquote>
  
  <p>However, I couldn't get an alternative widget to use.</p>
  
  <pre><code>final TextView prince = findViewById(R.id.Principle_Result);
  </code></pre>
  
  <p>TextView has a crossover. It does ask to import org.w3c.dom.Text; Not sure about the correct way. Please help, thanks.</p>
  
  <p><a href="https://i.stack.imgur.com/6R5VN.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>Gradle as below </p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 27
      defaultConfig {
          applicationId "com.example.ssa.emisecond"
          minSdkVersion 19
          targetSdkVersion 27
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
  
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support.constraint:constraint-layout:1.1.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.android.support:design:27.1.1'
  }
  </code></pre>
  
  <p>Import </p>
  
  <pre><code>import android.content.Context;
  import android.content.Intent;
  import android.graphics.Color;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.text.TextUtils;
  import android.view.View;
  import android.view.WindowManager;
  import android.view.inputmethod.InputMethodManager;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.Switch;
  import android.widget.TextView;
  import android.widget.Toast;
  
  import com.github.mikephil.charting.charts.PieChart;
  import com.github.mikephil.charting.data.PieData;
  import com.github.mikephil.charting.data.PieDataSet;
  import com.github.mikephil.charting.data.PieEntry;
  import com.github.mikephil.charting.utils.ColorTemplate;
  
  import java.text.DecimalFormat;
  import java.util.ArrayList;
  </code></pre>