Theming: chart colors extracted.

This commit is contained in:
Dennis Guse
2020-09-15 18:33:46 +02:00
parent 91e8eb66b1
commit 240cb4b363
2 changed files with 4 additions and 3 deletions
@@ -310,7 +310,7 @@ public class ChartView extends View {
axisPaint = new Paint();
axisPaint.setStyle(Style.FILL_AND_STROKE);
axisPaint.setColor(context.getResources().getColor(android.R.color.black));
axisPaint.setColor(context.getResources().getColor(R.color.chart_axis_text));
axisPaint.setAntiAlias(true);
axisPaint.setTextSize(SMALL_TEXT_SIZE * scale);
@@ -319,13 +319,12 @@ public class ChartView extends View {
gridPaint = new Paint();
gridPaint.setStyle(Style.STROKE);
gridPaint.setColor(context.getResources().getColor(android.R.color.darker_gray));
gridPaint.setColor(context.getResources().getColor(R.color.chart_grid));
gridPaint.setAntiAlias(false);
gridPaint.setPathEffect(new DashPathEffect(new float[]{3, 2}, 0));
markerPaint = new Paint();
markerPaint.setStyle(Style.STROKE);
markerPaint.setColor(context.getResources().getColor(android.R.color.darker_gray));
markerPaint.setAntiAlias(false);
pointer = context.getResources().getDrawable(R.drawable.ic_logo_color_24dp);
+2
View File
@@ -26,6 +26,8 @@ limitations under the License.
<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="chart_grid">@android:color/darker_gray</color>
<color name="chart_axis_text">@android:color/black</color>
<color name="holo_orange_dark">#FFFF8800</color>