set text to textview android code example
Example 1: android studio set text of textview
// globally
TextView myAwesomeTextView = (TextView)findViewById(R.id.myAwesomeTextView);
//in your OnCreate() method
myAwesomeTextView.setText("My Awesome Text");
Example 2: how to create textview in java android
TextView textView = new TextView(this);