Code cleanup: add ic_ prefix to icons

This commit is contained in:
Jimmy Shih
2013-07-09 11:53:25 -07:00
parent ae456a498e
commit 1ddb53ad47
67 changed files with 39 additions and 36 deletions
+1 -1
View File
@@ -252,7 +252,7 @@ limitations under the License.
<service
android:enabled="true"
android:exported="true"
android:icon="@drawable/arrow_320"
android:icon="@drawable/ic_arrow_320"
android:label="@string/my_tracks_recording_service"
android:name="com.google.android.apps.mytracks.services.TrackRecordingService"
android:permission="com.google.android.apps.mytracks.WRITE_TRACK_DATA" />

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 720 B

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 812 B

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Before

Width:  |  Height:  |  Size: 945 B

After

Width:  |  Height:  |  Size: 945 B

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

@@ -15,6 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/btn_record_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/btn_record"/>
<item android:drawable="@drawable/ic_button_pause_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_button_pause"/>
</selector>
@@ -15,6 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/btn_stop_1_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/btn_stop_1"/>
<item android:drawable="@drawable/ic_button_record_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_button_record"/>
</selector>
@@ -15,6 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/btn_pause_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/btn_pause"/>
<item android:drawable="@drawable/ic_button_stop_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_button_stop"/>
</selector>
+2 -2
View File
@@ -15,6 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/my_location_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/my_location_normal"/>
<item android:drawable="@drawable/ic_my_location_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_my_location"/>
</selector>
@@ -61,7 +61,7 @@ limitations under the License.
android:layout_height="0dp"
android:layout_weight="10"
android:layout_width="match_parent"
android:src="@drawable/btn_stop_0" />
android:src="@drawable/ic_button_stop_disabled" />
<View
android:layout_height="0dp"
android:layout_weight="1"
+1 -1
View File
@@ -20,7 +20,7 @@ limitations under the License.
android:layout_width="match_parent" >
<TextView
android:background="@color/warning_background"
android:drawableLeft="@drawable/warning"
android:drawableLeft="@drawable/ic_warning"
android:gravity="left|center_vertical"
android:id="@+id/map_message"
android:layout_alignParentTop="true"
+2 -2
View File
@@ -33,7 +33,7 @@ limitations under the License.
android:layout_width="match_parent"
android:orientation="vertical" >
<EditText
android:drawableLeft="@drawable/yellow_pushpin"
android:drawableLeft="@drawable/ic_marker_yellow_pushpin"
android:hint="@string/generic_name"
android:id="@+id/marker_edit_statistics_name"
android:imeOptions="actionDone"
@@ -45,7 +45,7 @@ limitations under the License.
android:layout_width="match_parent"
android:orientation="vertical" >
<EditText
android:drawableLeft="@drawable/blue_pushpin"
android:drawableLeft="@drawable/ic_marker_blue_pushpin"
android:hint="@string/generic_name"
android:id="@+id/marker_edit_waypoint_name"
android:imeOptions="actionNext"
+1 -1
View File
@@ -62,7 +62,7 @@ limitations under the License.
android:layout_height="wrap_content"
android:layout_weight="10"
android:layout_width="0dp"
android:src="@drawable/btn_stop_0" />
android:src="@drawable/ic_button_stop_disabled" />
<View
android:layout_height="match_parent"
android:layout_weight="1"
+2 -2
View File
@@ -27,7 +27,7 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_record_track"
android:id="@+id/track_widget_record_button"
android:src="@drawable/record_button"
android:src="@drawable/button_record"
style="@style/TrackWidgetButton" />
<LinearLayout
android:id="@+id/track_widget_stats_container"
@@ -92,7 +92,7 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_stop_recording"
android:id="@+id/track_widget_stop_button"
android:src="@drawable/btn_stop_0"
android:src="@drawable/ic_button_stop_disabled"
style="@style/TrackWidgetButton" />
<LinearLayout
android:layout_weight="1"
+2 -2
View File
@@ -140,7 +140,7 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_record_track"
android:id="@+id/track_widget_record_button"
android:src="@drawable/record_button"
android:src="@drawable/button_record"
style="@style/TrackWidgetButton" />
<TextView
android:id="@+id/track_widget_record_status"
@@ -148,7 +148,7 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_stop_recording"
android:id="@+id/track_widget_stop_button"
android:src="@drawable/btn_stop_0"
android:src="@drawable/ic_button_stop_disabled"
style="@style/TrackWidgetButton" />
<LinearLayout
android:layout_weight="1"
+2 -2
View File
@@ -140,7 +140,7 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_record_track"
android:id="@+id/track_widget_record_button"
android:src="@drawable/record_button"
android:src="@drawable/button_record"
style="@style/TrackWidgetButton" />
<TextView
android:id="@+id/track_widget_record_status"
@@ -148,7 +148,7 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_stop_recording"
android:id="@+id/track_widget_stop_button"
android:src="@drawable/btn_stop_0"
android:src="@drawable/ic_button_stop_disabled"
style="@style/TrackWidgetButton" />
<LinearLayout
android:layout_weight="1"
+2 -2
View File
@@ -144,7 +144,7 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_record_track"
android:id="@+id/track_widget_record_button"
android:src="@drawable/record_button"
android:src="@drawable/button_record"
style="@style/TrackWidgetButton" />
<TextView
android:id="@+id/track_widget_record_status"
@@ -152,7 +152,7 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_stop_recording"
android:id="@+id/track_widget_stop_button"
android:src="@drawable/btn_stop_0"
android:src="@drawable/ic_button_stop_disabled"
style="@style/TrackWidgetButton" />
<LinearLayout
android:layout_weight="1"
@@ -200,15 +200,15 @@ public class ChartView extends View {
markerPaint.setColor(context.getResources().getColor(android.R.color.darker_gray));
markerPaint.setAntiAlias(false);
pointer = context.getResources().getDrawable(R.drawable.arrow_180);
pointer = context.getResources().getDrawable(R.drawable.ic_arrow_180);
pointer.setBounds(0, 0, pointer.getIntrinsicWidth(), pointer.getIntrinsicHeight());
statisticsMarker = getResources().getDrawable(R.drawable.yellow_pushpin);
statisticsMarker = getResources().getDrawable(R.drawable.ic_marker_yellow_pushpin);
markerWidth = statisticsMarker.getIntrinsicWidth();
markerHeight = statisticsMarker.getIntrinsicHeight();
statisticsMarker.setBounds(0, 0, markerWidth, markerHeight);
waypointMarker = getResources().getDrawable(R.drawable.blue_pushpin);
waypointMarker = getResources().getDrawable(R.drawable.ic_marker_blue_pushpin);
waypointMarker.setBounds(0, 0, markerWidth, markerHeight);
scroller = new Scroller(context);
@@ -252,7 +252,7 @@ public class MapOverlay {
if (cachedLocation.valid) {
MarkerOptions markerOptions = new MarkerOptions().position(cachedLocation.getLatLng())
.anchor(MARKER_X_ANCHOR, MARKER_Y_ANCHOR).draggable(false).visible(true)
.icon(BitmapDescriptorFactory.fromResource(R.drawable.red_dot));
.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_marker_red_paddle));
googleMap.addMarker(markerOptions);
break;
}
@@ -266,7 +266,7 @@ public class MapOverlay {
if (cachedLocation.valid) {
MarkerOptions markerOptions = new MarkerOptions().position(cachedLocation.getLatLng())
.anchor(MARKER_X_ANCHOR, MARKER_Y_ANCHOR).draggable(false).visible(true)
.icon(BitmapDescriptorFactory.fromResource(R.drawable.green_dot));
.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_marker_green_paddle));
googleMap.addMarker(markerOptions);
hasStartMarker = true;
break;
@@ -285,8 +285,8 @@ public class MapOverlay {
for (Waypoint waypoint : waypoints) {
Location location = waypoint.getLocation();
LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
int drawableId = waypoint.getType() == WaypointType.STATISTICS ? R.drawable.yellow_pushpin
: R.drawable.blue_pushpin;
int drawableId = waypoint.getType() == WaypointType.STATISTICS
? R.drawable.ic_marker_yellow_pushpin : R.drawable.ic_marker_blue_pushpin;
MarkerOptions markerOptions = new MarkerOptions().position(latLng)
.anchor(WAYPOINT_X_ANCHOR, WAYPOINT_Y_ANCHOR).draggable(false).visible(true)
.icon(BitmapDescriptorFactory.fromResource(drawableId))
@@ -179,7 +179,8 @@ public class MarkerListActivity extends AbstractMyTracksActivity implements Dele
boolean statistics = WaypointType.values()[cursor.getInt(typeIndex)]
== WaypointType.STATISTICS;
int iconId = statistics ? R.drawable.yellow_pushpin : R.drawable.blue_pushpin;
int iconId = statistics ? R.drawable.ic_marker_yellow_pushpin
: R.drawable.ic_marker_blue_pushpin;
String category = statistics ? null : cursor.getString(categoryIndex);
String description = statistics ? null : cursor.getString(descriptionIndex);
ListItemUtils.setListItem(MarkerListActivity.this, view, false, true, iconId,
@@ -483,7 +483,8 @@ public class SearchListActivity extends AbstractSendToGoogleActivity implements
resultMap.put(IS_RECORDING_FIELD, false);
resultMap.put(IS_PAUSED_FIELD, true);
resultMap.put(ICON_ID_FIELD, statistics ? R.drawable.yellow_pushpin : R.drawable.blue_pushpin);
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(NAME_FIELD, waypoint.getName());
resultMap.put(CATEGORY_FIELD, statistics ? null : waypoint.getCategory());
@@ -101,11 +101,12 @@ public class TrackController {
}
recordImageButton.setImageResource(
isRecording && !isPaused ? R.drawable.pause_button : R.drawable.record_button);
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));
stopImageButton.setImageResource(isRecording ? R.drawable.stop_1_button : R.drawable.btn_stop_0);
stopImageButton.setImageResource(
isRecording ? R.drawable.button_stop : R.drawable.ic_button_stop_disabled);
stopImageButton.setEnabled(isRecording);
statusTextView.setVisibility(isRecording ? View.VISIBLE : View.INVISIBLE);
@@ -433,7 +433,7 @@ public class TrackWidgetProvider extends AppWidgetProvider {
private static void updateRecordButton(
Context context, RemoteViews remoteViews, boolean isRecording, boolean recordingTrackPaused) {
remoteViews.setImageViewResource(R.id.track_widget_record_button,
isRecording && !recordingTrackPaused ? R.drawable.pause_button : R.drawable.record_button);
isRecording && !recordingTrackPaused ? R.drawable.button_pause : R.drawable.button_record);
int recordActionId;
if (isRecording) {
recordActionId = recordingTrackPaused ? R.string.track_action_resume
@@ -457,8 +457,8 @@ public class TrackWidgetProvider extends AppWidgetProvider {
*/
private static void updateStopButton(
Context context, RemoteViews remoteViews, boolean isRecording) {
remoteViews.setImageViewResource(
R.id.track_widget_stop_button, isRecording ? R.drawable.stop_1_button : R.drawable.btn_stop_0);
remoteViews.setImageViewResource(R.id.track_widget_stop_button,
isRecording ? R.drawable.button_stop : R.drawable.ic_button_stop_disabled);
remoteViews.setBoolean(R.id.track_widget_stop_button, "setEnabled", isRecording);
if (isRecording) {
Intent intent = new Intent(context, ControlRecordingService.class).setAction(