Codeclean: accessibility content description

This commit is contained in:
Jimmy Shih
2014-01-13 14:25:33 -08:00
parent f43d2ab766
commit 2f64785a63
20 changed files with 77 additions and 59 deletions
@@ -189,7 +189,7 @@ public class MarkerListActivity extends AbstractMyTracksActivity implements Dele
String photoUrl = cursor.getString(photoUrlIndex);
ListItemUtils.setListItem(MarkerListActivity.this, view, false, true, iconId,
R.string.icon_marker, name, null, null, null, 0, time, false, category, description,
R.string.image_marker, name, null, null, null, 0, time, false, category, description,
photoUrl);
}
};
@@ -487,7 +487,7 @@ public class SearchListActivity extends AbstractSendToGoogleActivity implements
resultMap.put(IS_PAUSED_FIELD, true);
resultMap.put(ICON_ID_FIELD,
statistics ? R.drawable.ic_marker_yellow_pushpin : R.drawable.ic_marker_blue_pushpin);
resultMap.put(ICON_CONTENT_DESCRIPTION_ID_FIELD, R.string.icon_marker);
resultMap.put(ICON_CONTENT_DESCRIPTION_ID_FIELD, R.string.image_marker);
resultMap.put(NAME_FIELD, waypoint.getName());
resultMap.put(SHARED_OWNER_FIELD, null);
// Display the marker's track name in the total time field
@@ -517,7 +517,7 @@ public class SearchListActivity extends AbstractSendToGoogleActivity implements
resultMap.put(IS_RECORDING_FIELD, track.getId() == recordingTrackId);
resultMap.put(IS_PAUSED_FIELD, recordingTrackPaused);
resultMap.put(ICON_ID_FIELD, TrackIconUtils.getIconDrawable(icon));
resultMap.put(ICON_CONTENT_DESCRIPTION_ID_FIELD, R.string.icon_track);
resultMap.put(ICON_CONTENT_DESCRIPTION_ID_FIELD, R.string.image_track);
resultMap.put(NAME_FIELD, track.getName());
resultMap.put(SHARED_OWNER_FIELD, track.getSharedOwner());
resultMap.put(TOTAL_TIME_FIELD, StringUtils.formatElapsedTime(tripStatitics.getTotalTime()));
@@ -106,7 +106,7 @@ public class TrackController {
recordImageButton.setImageResource(
isRecording && !isPaused ? R.drawable.button_pause : R.drawable.button_record);
recordImageButton.setContentDescription(activity.getString(
isRecording && !isPaused ? R.string.icon_pause_recording : R.string.icon_record_track));
isRecording && !isPaused ? R.string.image_pause : R.string.image_record));
stopImageButton.setImageResource(
isRecording ? R.drawable.button_stop : R.drawable.ic_button_stop_disabled);
@@ -383,7 +383,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
String description = cursor.getString(descriptionIndex);
ListItemUtils.setListItem(TrackListActivity.this, view, isRecording, recordingTrackPaused,
iconId, R.string.icon_track, name, sharedOwner, totalTime, totalDistance, markerCount,
iconId, R.string.image_track, name, sharedOwner, totalTime, totalDistance, markerCount,
startTime, true, category, description, null);
}
};
@@ -88,8 +88,7 @@ public class ListItemUtils {
// Set icon
if (isRecording) {
iconId = isPaused ? R.drawable.ic_track_paused : R.drawable.ic_track_recording;
iconContentDescriptionId = isPaused ? R.string.icon_pause_recording
: R.string.icon_record_track;
iconContentDescriptionId = isPaused ? R.string.image_pause : R.string.image_record;
}
ImageView iconImageView = (ImageView) view.findViewById(R.id.list_item_icon);