That is because indeed Fragment
does not have such method findViewById()
.
Instead, you should use the rootView
to access it.
AutoCompleteTextView autoCompView =
(AutoCompleteTextView)rootView.findViewById(R.id.autocomplete_city);