use same red/green for expiry as for net status

Slightly less glaring; slightly more consistency.
This commit is contained in:
Eric House 2017-09-01 08:12:38 -07:00
parent e97dd26e6f
commit 1c3b5564b5
3 changed files with 7 additions and 8 deletions

View file

@ -52,9 +52,6 @@ public class ConnStatusHandler {
public Handler getHandler();
}
private static final int GREEN = 0xFF00AF00;
private static final int RED = 0xFFAF0000;
private static final int BLACK = 0xFF000000;
private static final int SUCCESS_IN = 0;
private static final int SUCCESS_OUT = 1;
private static final int SHOW_SUCCESS_INTERVAL = 1000;
@ -340,7 +337,7 @@ public class ConnStatusHandler {
boolean isIn )
{
enabled = enabled && null != newestSuccess( connTypes, isIn );
s_fillPaint.setColor( enabled ? GREEN : RED );
s_fillPaint.setColor( enabled ? XWApp.GREEN : XWApp.RED );
canvas.drawRect( rect, s_fillPaint );
}

View file

@ -22,7 +22,6 @@ package org.eehouse.android.xw4;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
@ -214,13 +213,13 @@ public class ExpiringDelegate {
int offset = 0;
int count = s_points.length;
if ( 0 < redWidth ) {
s_paint.setColor( Color.RED );
s_paint.setColor( XWApp.RED );
canvas.drawLines( s_points, offset, count / 2, s_paint );
count /= 2;
offset += count;
}
if ( redWidth < width ) {
s_paint.setColor( Color.GREEN );
s_paint.setColor( XWApp.GREEN );
}
canvas.drawLines( s_points, offset, count, s_paint );
}
@ -256,7 +255,7 @@ public class ExpiringDelegate {
Paint paint = new Paint();
paint.setStyle(Paint.Style.FILL);
paint.setColor( Color.RED );
paint.setColor( XWApp.RED );
canvas.drawRect( 0, 0, pct, 1, paint );
paint.setColor( Utils.TURN_COLOR );
canvas.drawRect( pct, 0, 100, 1, paint );

View file

@ -53,6 +53,9 @@ public class XWApp extends Application {
public static final int MAX_TRAY_TILES = 7; // comtypes.h
public static final int SEL_COLOR = Color.argb( 0xFF, 0x09, 0x70, 0x93 );
public static final int GREEN = 0xFF00AF00;
public static final int RED = 0xFFAF0000;
private static UUID s_UUID = null;
private static Boolean s_onEmulator = null;
private static Context s_context = null;