/** {@inheritDoc} */ @Override public void bindView(View view, Context context, Cursor cursor) { final TextView titleView = (TextView) view.findViewById(R.id.session_title); final TextView subtitleView = (TextView) view.findViewById(R.id.session_subtitle); final TextView subtitleTagView = (TextView) view.findViewById(R.id.session_subtitle_tag); titleView.setText(cursor.getString(SessionsQuery.TITLE)); // Format time block this session occupies final long blockStart = cursor.getLong(SessionsQuery.BLOCK_START); final long blockEnd = cursor.getLong(SessionsQuery.BLOCK_END); final String roomName = cursor.getString(SessionsQuery.ROOM_NAME); final Spanned subtitle = formatSessionSubtitle(blockStart, blockEnd, roomName, context); subtitleView.setText(subtitle); subtitleTagView.setText(cursor.getString(SessionsQuery.SESSION_THEME)); final boolean starred = cursor.getInt(SessionsQuery.STARRED) != 0; view.findViewById(R.id.star_button).setVisibility(starred ? View.VISIBLE : View.INVISIBLE); // Possibly indicate that the session has occurred in the past. UIUtils.setSessionTitleColor(blockStart, blockEnd, titleView, subtitleView); }