I have problem using the findViewByID methond in a fragment.
The spinner in Spinner spinner = (Spinner) view.findViewById(R.id.tabsearchspinner_location);
Inflate your View
without a ViewGroup
, as it's simply inside your FragmentActivity:
View view = inflater.inflate(R.layout.fragment_tab_suggestions, null);
And the way IDs are added inside the XML layout files is like this:
android:id="@+id/tabsearchspinner_location"
As you can see, you're missing the +
Sorry, I just found out that I inflated the wrong layout, so the findViewById
method always returns null, thanks for all the help though.