Populating A Text View In An Android Fragment From A Text File In /res/raw
I am attempting to populate an textview in an android fragment. I am having no luck at all as the fragment is blank. I know I am fundamentally missing something. I have read the do
Solution 1:
here is a bug in your Code. cuz you have forgotten the reference to TextView
so add
TextView text = (TextView) rootView.findViewById(R.id.txtSource);
and then text.setText("your text!");
hope work for you:)
Solution 2:
you forgot to find the textview:
TextViewtext= (TextView) rootView.findViewById(R.id.txtSource);
Post a Comment for "Populating A Text View In An Android Fragment From A Text File In /res/raw"