private String convertCursorRowToUXFormat(Cursor cursor) { // get row indices for our cursor String highAndLow = formatHighLows( cursor.getDouble(ForecastFragment.COL_WEATHER_MAX_TEMP), cursor.getDouble(ForecastFragment.COL_WEATHER_MIN_TEMP)); return Utility.formatDate(cursor.getLong(ForecastFragment.COL_WEATHER_DATE)) + " - " + cursor.getString(ForecastFragment.COL_WEATHER_DESC) + " - " + highAndLow; }
private String convertCursorRowToUXFormat(Cursor cursor) { // get row indices for our cursor int idx_max_temp = cursor.getColumnIndex(WeatherContract.WeatherEntry.COLUMN_MAX_TEMP); int idx_min_temp = cursor.getColumnIndex(WeatherContract.WeatherEntry.COLUMN_MIN_TEMP); int idx_date = cursor.getColumnIndex(WeatherContract.WeatherEntry.COLUMN_DATE); int idx_short_desc = cursor.getColumnIndex(WeatherContract.WeatherEntry.COLUMN_SHORT_DESC); String highAndLow = formatHighLows(cursor.getDouble(idx_max_temp), cursor.getDouble(idx_min_temp)); return Utility.formatDate(cursor.getLong(idx_date)) + " - " + cursor.getString(idx_short_desc) + " - " + highAndLow; }