I have a class that fetches som data from a website. I've followed TheNewBoston's tutorial (147-149 I think) and copied what he writes exactly, but it doesn't work for me. The problem is the setText
. I try to switch tv.setText(returned)
to tv.setText("Hello")
but it doesn't change. Anyone know what's wrong?
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tv= (TextView) findViewById(R.id.text1);
GetMethodEx test = new GetMethodEx();
String returned;
try {
returned = test.getInternetData();
tv.setText(returned);
} catch (Exception e) {
e.printStackTrace();
}
}