BT
package com.example.myapplication;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import com.example.myapplication.R;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv;
tv=findViewById(R.id.txts);
String txt="какой-то текст";
tv.setText("txt");
setContentView(R.layout.activity_main);
}
}