How can I get the context in a fragment?
I need to use my database whose constructor takes in the context, but getApplicationContext()
and Fragmen
I need context for using arrayAdapter IN fragment, when I was using getActivity error occurs but when i replace it with getContext it works for me
listView LV=getView().findViewById(R.id.listOFsensors);
LV.setAdapter(new ArrayAdapter(getContext(),android.R.layout.simple_list_item_1 ,listSensorType));