Could anyone please help me to understand this?
How can I call textView.setText("") inside the onCreate method
View IDs: how can I call textView.setText("") inside onCreate
First of all, you cannot call a variable outside it’s scope, first declare the variable at a top level, like this:
Public class Test activity extends Activity{
Private TextView textView;
@override
Public void onCreate(){
Initialize your textView with findvirwById etc}…
}
Now call your variable from wherever you want within this class