Not sure if this is what you mean, but you can set the ContentView to your textview object:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView greeting= new TextView(this);
greeting.setText("Hello World!");
setContentView(greeting);
}
Of course, this is generally not considered good programming practice. It's usually better to isolate view from the data, etc.

Reply With Quote
Bookmarks