У меня есть приложение с tabLayout из 2 фрагментов с listView, и я хочу загрузить контент из URLConnection с Json, но в файле Fragment.java. Geht the Error: can not разрешить метод 'findViewByID (int)'.Ошибка: не удается найти метод символа findviewbyid
public class Fragment1 extends Fragment implements URLConnectionResponse {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
CanteenProvider canProv = new CanteenProvider();
canProv.delegate = this;
canProv.getDishes(getActivity().getApplicationContext());
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.activity_canteen_tab_mensa, container, false);
}
@Override
public void processFinish(List<?> output) {
ListView canteenList = (ListView) findViewById(R.id.mensalistView);
ArrayList<Dish> canteenItemContent = new ArrayList<Dish>();
canteenItemContent = (ArrayList<Dish>)output;
CanteenListAdapter canteenAdapter = new CanteenListAdapter(canteenItemContent, this);
canteenList.setAdapter(canteenAdapter);
}
}