Hey this is my first time using stack overflow and I am trying to call a class in a different file (MainActivity calling FetchWeatherTask) I am getting the error is not an enclosing class this is code is throwing the error
@Override
public boolean onOptionsItemSelected (MenuItem item){
int id = item.getItemId();
if (id == R.id.action_refresh) {
ForecastFragment.FetchWeatherTask weatherTask = new ForecastFragment.FetchWeatherTask();
weatherTask.execute();
return true;
}
im going to try a few things but I am stuck the full error is
'com.alpha.(appName).ForecastFragment' is not an enclosing class
EDIT:
im trying to call a class in a different file to get the weather data