This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Format used for storing dates in the database. ALso used for converting those strings | |
// back into date objects for comparison/processing. | |
public static final String DATE_FORMAT = "yyyyMMdd"; | |
/** | |
* Helper method to convert the database representation of the date into something to display | |
* to users. As classy and polished a user experience as "20140102" is, we can do better. | |
* | |
* @param context Context to use for resource localization | |
* @param dateInMillis The date in milliseconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is where we fill-in the views with the contents of the cursor. | |
*/ | |
@Override | |
public void bindView(View view, Context context, Cursor cursor) { | |
// our view is pretty simple here --- just a text view | |
// we'll keep the UI functional with a simple (and slow!) binding. | |
// Read weather icon ID from cursor | |
int weatherId = cursor.getInt(ForecastFragment.COL_WEATHER_ID); |