I have this code, does anybody know why I get an error when I compile this on my Phone?
public void onSectionAttached(int number) {
TextView textView = (TextView) findViewById(R.id.textView1);
textView.setVisibility(View.VISIBLE);
switch (number) {
case 1:
mTitle = getString(R.string.title_section1);
break;
case 2:
mTitle = getString(R.string.title_section2);
textView.setVisibility(View.GONE);
break;
case 3:
mTitle = getString(R.string.title_section3);
textView.setVisibility(View.GONE);
break;
}
}
EDIT : This is the error I get, it goes wrong on the setVisibitily lines.