My code:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// t-alk és impresszumhoz
First I needed to inflate the layout, to be able to use findViewById() .
Finally the solution:
This is not needed:
LinearLayout layout = (LinearLayout) view
.findViewById(R.layout.impresszum);
Instead this should be used:
View view = inflater.inflate(R.layout.impresszum, container, false);
And another modification in this line:
((TextView) **view**.findViewById(R.id.impresszumtext1))
.setText(appName + " v." + versionName);
I have found some explanation, too: If I am thinking right, first I needed to inflate the layout to be able to access the objects using "findViewById"... It is sneaking, because setcontentview() does this for us.