J
J
JordanBelford2017-06-01 17:27:33
Android
JordanBelford, 2017-06-01 17:27:33

Why does Fragmente swear at findViewById()?

Where findViewbyId swears, tell me what could be the problem.

ListUserDrive = (ListView) findViewById(R.id.discr_for_tasks);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
7
7365656c65, 2017-06-01
@JordanBelford

Because he can't figure out which object to look for! for example view .findViewById...
sorry, didn't read the comments in question. Add:
View view = inflater.inflate(R.layout."fragment layout resource", container, false);
and change return to return view;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question