textviewの静的表示のサンプルをJAVAプログラムからHello World!を表示させるサンプルです。

サンプル

activity_main.xml

					
<android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
				

MainActivity.java

					
TextView tv = this.findViewById(R.id.textView);
tv.setText("Hello World!");