You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
WeatherContract.WeatherEntry.COLUMN_LOC_KEY, is missing in FORECAST_COLUMNS columns.
In onCreateView Cursor cursor = (Cursor) adapterView.getItemAtPosition(position); the cursor returns the WeatherContract.WeatherEntry.COLUMN_LOC_KEY in second position and WeatherContract.WeatherEntry.COLUMN_DATE, in third position.
So the indices for the FORECAST_COLUMNS also need to be changed.
The following lines need to be added in ForecastFragment:
WeatherContract.WeatherEntry.COLUMN_LOC_KEY,
static final int COL_LOCATION_ID = 1;
static final int COL_WEATHER_DATE = 2;
The text was updated successfully, but these errors were encountered:
I'm facing this issue also, I made FORECAST_COULMN public then did some refactoring in ForecastAdapter as given below
int dateInMillisIndex = cursor.getColumnIndex(ForecastFragment.FORECAST_COLUMNS[ForecastFragment.COL_WEATHER_DATE]);
long dateInMillis = cursor.getLong(dateInMillisIndex);
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
WeatherContract.WeatherEntry.COLUMN_LOC_KEY, is missing in FORECAST_COLUMNS columns.
In onCreateView Cursor cursor = (Cursor) adapterView.getItemAtPosition(position); the cursor returns the WeatherContract.WeatherEntry.COLUMN_LOC_KEY in second position and WeatherContract.WeatherEntry.COLUMN_DATE, in third position.
So the indices for the FORECAST_COLUMNS also need to be changed.
The following lines need to be added in ForecastFragment:
static final int COL_LOCATION_ID = 1;
static final int COL_WEATHER_DATE = 2;
The text was updated successfully, but these errors were encountered: