I have an almost completely Vanilla App. All I\'m trying to do is change the text of a textView, but it gives me a NullPointerException. I have no XML configuration, no added me
Can you post xml? It's likely that the id your java is assuming "R.id.textView1" is wrong. Maybe R.id.textview1?
Well if your text view lives inside the fragment just do this:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container,
false);
TextView tv = (TextView) rootView.findViewById(R.id.textView1);
tv.setText("Teststring");
return rootView;
}