Answer the question
In order to leave comments, you need to log in
When getting a link to the base context, idea swears, what should I do?
Everything was fine in the activity, in the fragment it swears, what could be the problem?
private void updateUI() {
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getBaseContext(), android.R.layout.simple_list_item_1, drive);
ListUserDrive.setAdapter(adapter);
}
Answer the question
In order to leave comments, you need to log in
And rightly so, fragments do not have this method. Use getActivity or getContext.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question