clean up colors.xml

This commit is contained in:
Jimmy Shih
2013-04-30 13:27:47 -07:00
parent 9e194021c5
commit 67fbb47639
10 changed files with 46 additions and 60 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ limitations under the License.
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:singleLine">true</item>
<item name="android:textColor">@color/orange</item>
<item name="android:textColor">@color/track_widget_label</item>
<item name="android:textSize">10dp</item>
<item name="android:textStyle">bold</item>
<item name="android:textAllCaps">true</item>
+20 -34
View File
@@ -15,38 +15,24 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<color name="black">#FF000000</color>
<color name="gray">#FF444444</color>
<color name="orange">#FFFAAD2C</color>
<color name="red">#FFBE161B</color>
<!-- holo_orange_dark -->
<color name="warning_background">#FFFF8800</color>
<!-- elevation chart colors, green and transparent green -->
<color name="elevation_border">#FF339933</color>
<color name="elevation_fill">#40B3CFB3</color>
<!-- speed chart colors, blue and transparent blue -->
<color name="speed_border">#FF0066FF</color>
<color name="speed_fill">#40C8E0FF</color>
<!-- pace chart colors, blue and transparent blue -->
<color name="pace_border">#FF0066FF</color>
<color name="pace_fill">#40C8E0FF</color>
<!-- heart rate chart colors, red and transparent red -->
<color name="heart_rate_border">#FFCC3300</color>
<color name="heart_rate_fill">#40E88A70</color>
<!-- cadence chart colors, pink and transparent pink -->
<color name="cadence_border">#FFF128F3</color>
<color name="cadence_fill">#40F128F3</color>
<!-- power chart colors, purple and transparent purple -->
<color name="power_border">#FF401465</color>
<color name="power_fill">#40401465</color>
<!-- track widget -->
<color name="track_widget_line">#99999999</color>
<!-- dynamic track slow path, green -->
<color name="slow_path">#F774DF00</color>
<!-- dynamic track normal path, blue -->
<color name="normal_path">#F75858FA</color>
<!-- dynamic track fast path, red -->
<color name="fast_path">#F7DF0101</color>
<!-- track controller background -->
<color name="track_controller_background">#FF272727</color>
<color name="chart_cadence_border">#FFF128F3</color> <!-- pink -->
<color name="chart_cadence_fill">#40F128F3</color> <!-- transparent pink -->
<color name="chart_elevation_border">#FF339933</color> <!-- green -->
<color name="chart_elevation_fill">#40B3CFB3</color> <!-- transparent green -->
<color name="chart_heart_rate_border">#FFCC3300</color> <!-- red -->
<color name="chart_heart_rate_fill">#40E88A70</color> <!-- transparent red -->
<color name="chart_pace_border">#FF0066FF</color> <!-- blue -->
<color name="chart_pace_fill">#40C8E0FF</color> <!-- transparent blue -->
<color name="chart_power_border">#FF401465</color> <!-- purple -->
<color name="chart_power_fill">#40401465</color> <!-- transparent purple -->
<color name="chart_speed_border">#FF0066FF</color> <!-- blue -->
<color name="chart_speed_fill">#40C8E0FF</color> <!-- transparent blue -->
<color name="recording_text">#FFBE161B</color> <!-- red -->
<color name="track_color_fast">#F7DF0101</color> <!-- red color -->
<color name="track_color_normal">#F75858FA</color> <!-- blue color -->
<color name="track_color_slow">#F774DF00</color> <!-- green color -->
<color name="track_controller_background">#FF272727</color> <!-- dark gray -->
<color name="track_widget_label">#FFFAAD2C</color> <!-- orange -->
<color name="track_widget_line">#99999999</color> <!-- light gray -->
<color name="warning_background">#FFFF8800</color> <!-- orange dark -->
</resources>
+1 -1
View File
@@ -291,7 +291,7 @@ limitations under the License.
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:singleLine">true</item>
<item name="android:textColor">@color/orange</item>
<item name="android:textColor">@color/track_widget_label</item>
<item name="android:textSize">10dp</item>
<item name="android:textStyle">bold</item>
</style>
@@ -135,54 +135,54 @@ public class ChartView extends View {
new int[] { 5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000 },
R.string.description_elevation_metric,
R.string.description_elevation_imperial,
R.color.elevation_fill,
R.color.elevation_border);
R.color.chart_elevation_fill,
R.color.chart_elevation_border);
series[SPEED_SERIES] = new ChartValueSeries(context,
0,
Integer.MAX_VALUE,
new int[] {1, 5, 10, 20, 50, 100 },
R.string.description_speed_metric,
R.string.description_speed_imperial,
R.color.speed_fill,
R.color.speed_border);
R.color.chart_speed_fill,
R.color.chart_speed_border);
series[PACE_SERIES] = new ChartValueSeries(context,
0,
Integer.MAX_VALUE,
new int[] {1, 2, 5, 10, 15, 20, 30, 60, 120 },
R.string.description_pace_metric,
R.string.description_pace_imperial,
R.color.pace_fill,
R.color.pace_border);
R.color.chart_pace_fill,
R.color.chart_pace_border);
series[HEART_RATE_SERIES] = new ChartValueSeries(context,
0,
Integer.MAX_VALUE,
new int[] {25, 50 },
R.string.description_sensor_heart_rate,
R.string.description_sensor_heart_rate,
R.color.heart_rate_fill,
R.color.heart_rate_border);
R.color.chart_heart_rate_fill,
R.color.chart_heart_rate_border);
series[CADENCE_SERIES] = new ChartValueSeries(context,
0,
Integer.MAX_VALUE,
new int[] {5, 10, 25, 50 },
R.string.description_sensor_cadence,
R.string.description_sensor_cadence,
R.color.cadence_fill,
R.color.cadence_border);
R.color.chart_cadence_fill,
R.color.chart_cadence_border);
series[POWER_SERIES] = new ChartValueSeries(context,
0,
1000,
new int[] { 5, 50, 100, 200 },
R.string.description_sensor_power,
R.string.description_sensor_power,
R.color.power_fill,
R.color.power_border);
R.color.chart_power_fill,
R.color.chart_power_border);
float scale = context.getResources().getDisplayMetrics().density;
axisPaint = new Paint();
axisPaint.setStyle(Style.STROKE);
axisPaint.setColor(context.getResources().getColor(R.color.black));
axisPaint.setColor(context.getResources().getColor(android.R.color.black));
axisPaint.setAntiAlias(true);
axisPaint.setTextSize(SMALL_TEXT_SIZE * scale);
@@ -191,13 +191,13 @@ public class ChartView extends View {
gridPaint = new Paint();
gridPaint.setStyle(Style.STROKE);
gridPaint.setColor(context.getResources().getColor(R.color.gray));
gridPaint.setColor(context.getResources().getColor(android.R.color.darker_gray));
gridPaint.setAntiAlias(false);
gridPaint.setPathEffect(new DashPathEffect(new float[] { 3, 2 }, 0));
markerPaint = new Paint();
markerPaint.setStyle(Style.STROKE);
markerPaint.setColor(context.getResources().getColor(R.color.gray));
markerPaint.setColor(context.getResources().getColor(android.R.color.darker_gray));
markerPaint.setAntiAlias(false);
pointer = context.getResources().getDrawable(R.drawable.arrow_180);
@@ -110,7 +110,7 @@ public class TrackController {
statusTextView.setVisibility(isRecording ? View.VISIBLE : View.INVISIBLE);
if (isRecording) {
statusTextView.setTextColor(
activity.getResources().getColor(isPaused ? android.R.color.white : R.color.red));
activity.getResources().getColor(isPaused ? android.R.color.white : R.color.recording_text));
statusTextView.setText(isPaused ? R.string.generic_paused : R.string.generic_recording);
}
@@ -41,9 +41,9 @@ public class MultiColorTrackPath implements TrackPath {
public MultiColorTrackPath(Context context, TrackPathDescriptor trackPathDescriptor) {
this.trackPathDescriptor = trackPathDescriptor;
slowColor = context.getResources().getColor(R.color.slow_path);
normalColor = context.getResources().getColor(R.color.normal_path);
fastColor = context.getResources().getColor(R.color.fast_path);
slowColor = context.getResources().getColor(R.color.track_color_slow);
normalColor = context.getResources().getColor(R.color.track_color_normal);
fastColor = context.getResources().getColor(R.color.track_color_fast);
}
@Override
@@ -36,7 +36,7 @@ public class SingleColorTrackPath implements TrackPath {
final int color;
public SingleColorTrackPath(Context context) {
color = context.getResources().getColor(R.color.fast_path);
color = context.getResources().getColor(R.color.track_color_fast);
}
@Override
@@ -84,7 +84,7 @@ public class ListItemUtils {
isPaused ? R.string.generic_paused : R.string.generic_recording)
: null;
int color = isRecording ? context.getResources()
.getColor(isPaused ? android.R.color.white : R.color.red)
.getColor(isPaused ? android.R.color.white : R.color.recording_text)
: 0;
setTextView(recordingTextView, value, color);
@@ -472,7 +472,7 @@ public class TrackWidgetProvider extends AppWidgetProvider {
if (isRecording) {
status = context.getString(
recordingTrackPaused ? R.string.generic_paused : R.string.generic_recording);
colorId = recordingTrackPaused ? android.R.color.white : R.color.red;
colorId = recordingTrackPaused ? android.R.color.white : R.color.recording_text;
} else {
status = "";
colorId = android.R.color.white;
@@ -35,8 +35,8 @@ public class ChartValueSeriesTest extends AndroidTestCase {
new int[] {100, 1000 },
R.string.description_elevation_metric,
R.string.description_elevation_imperial,
R.color.elevation_fill,
R.color.elevation_border);
R.color.chart_elevation_fill,
R.color.chart_elevation_border);
}
public void testInitialConditions() {