diff --git a/wear/src/main/java/info/nightscout/androidaps/BIGChart.java b/wear/src/main/java/info/nightscout/androidaps/BIGChart.java index 09f09d1615..520c6bfd9b 100644 --- a/wear/src/main/java/info/nightscout/androidaps/BIGChart.java +++ b/wear/src/main/java/info/nightscout/androidaps/BIGChart.java @@ -18,7 +18,6 @@ import android.os.PowerManager; import android.preference.PreferenceManager; import android.support.v4.content.ContextCompat; import android.support.v4.content.LocalBroadcastManager; -import android.support.v4.content.res.ResourcesCompat; import android.support.wearable.view.WatchViewStub; import android.support.wearable.watchface.WatchFaceStyle; import android.text.format.DateFormat; @@ -36,16 +35,12 @@ import com.ustwo.clockwise.wearable.WatchFace; import com.ustwo.clockwise.common.WatchFaceTime; import com.ustwo.clockwise.common.WatchMode; import com.ustwo.clockwise.common.WatchShape; -import com.ustwo.clockwise.common.util.Logr; import java.util.ArrayList; import java.util.Date; -import lecho.lib.hellocharts.util.ChartUtils; import lecho.lib.hellocharts.view.LineChartView; -import static java.security.AccessController.getContext; - /** * Created by adrianLxM. */ @@ -461,7 +456,7 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre protected void setColorDark() { mTime.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mTime)); statusView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_statusView)); - mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mRelativeLayout)); + mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_background)); if (sgvLevel == 1) { mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor)); mDelta.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor)); @@ -500,9 +495,9 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre protected void setColorBright() { if (getCurrentWatchMode() == WatchMode.INTERACTIVE) { - mTime.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_mTime)); - statusView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_statusView)); - mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_mRelativeLayout)); + mTime.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_bigchart_time)); + statusView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_bigchart_status)); + mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_background)); if (sgvLevel == 1) { mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_highColor)); mDelta.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_highColor)); diff --git a/wear/src/main/java/info/nightscout/androidaps/BgGraphBuilder.java b/wear/src/main/java/info/nightscout/androidaps/BgGraphBuilder.java index 11932cfb94..8dff9b82bd 100644 --- a/wear/src/main/java/info/nightscout/androidaps/BgGraphBuilder.java +++ b/wear/src/main/java/info/nightscout/androidaps/BgGraphBuilder.java @@ -212,12 +212,11 @@ public class BgGraphBuilder { Line valueLine = new Line(lineValues); valueLine.setHasPoints(false); if (isHighlightLine){ - valueLine.setColor(ContextCompat.getColor(context, R.color.valueLine_highlight)); + valueLine.setColor(ContextCompat.getColor(context, R.color.tempbasal_highlight)); valueLine.setStrokeWidth(1); }else { - valueLine.setColor(ContextCompat.getColor(context, R.color.valueLine_primary)); + valueLine.setColor(ContextCompat.getColor(context, R.color.tempbasal_primary)); valueLine.setStrokeWidth(strokeWidth); - valueLine.setFilled(true); } return valueLine; } diff --git a/wear/src/main/java/info/nightscout/androidaps/Home.java b/wear/src/main/java/info/nightscout/androidaps/Home.java index e9b337aa8e..596ecba144 100644 --- a/wear/src/main/java/info/nightscout/androidaps/Home.java +++ b/wear/src/main/java/info/nightscout/androidaps/Home.java @@ -6,10 +6,6 @@ import android.view.LayoutInflater; import com.ustwo.clockwise.common.WatchMode; -import lecho.lib.hellocharts.util.ChartUtils; - -import static android.content.Context.LAYOUT_INFLATER_SERVICE; - public class Home extends BaseWatchFace { @Override @@ -23,7 +19,7 @@ public class Home extends BaseWatchFace { protected void setColorDark() { mLinearLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_statusView)); mTime.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mTime)); - mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mRelativeLayout)); + mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_background)); if (sgvLevel == 1) { mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor)); mDelta.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor)); @@ -45,9 +41,9 @@ public class Home extends BaseWatchFace { } if (batteryLevel == 1) { - mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mUploaderBattery1_home)); + mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_uploaderBattery)); } else { - mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mUploaderBattery_home)); + mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_uploaderBatteryEmpty)); } mStatus.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mStatus_home)); @@ -66,8 +62,8 @@ public class Home extends BaseWatchFace { protected void setColorBright() { if (getCurrentWatchMode() == WatchMode.INTERACTIVE) { - mLinearLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_mLinearLayout)); - mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_mRelativeLayout)); + mLinearLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_stripe_background)); + mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_background)); if (sgvLevel == 1) { mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_highColor)); mDelta.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_highColor)); diff --git a/wear/src/main/java/info/nightscout/androidaps/LargeHome.java b/wear/src/main/java/info/nightscout/androidaps/LargeHome.java index ab790b6882..8f4f0e88af 100644 --- a/wear/src/main/java/info/nightscout/androidaps/LargeHome.java +++ b/wear/src/main/java/info/nightscout/androidaps/LargeHome.java @@ -21,7 +21,7 @@ public class LargeHome extends BaseWatchFace { protected void setColorDark(){ mLinearLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mLinearLayout)); mTime.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mTime)); - mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mRelativeLayout)); + mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_background)); if (sgvLevel == 1) { mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor)); mDelta.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_highColor)); @@ -43,9 +43,9 @@ public class LargeHome extends BaseWatchFace { } if (batteryLevel == 1) { - mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mUploaderBattery1_home)); + mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_uploaderBattery)); } else { - mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mUploaderBattery_home)); + mUploaderBattery.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_uploaderBatteryEmpty)); } mStatus.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.dark_mStatus_home)); @@ -54,8 +54,8 @@ public class LargeHome extends BaseWatchFace { @Override protected void setColorBright() { if (getCurrentWatchMode() == WatchMode.INTERACTIVE) { - mLinearLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_mLinearLayout)); - mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_mRelativeLayout)); + mLinearLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_stripe_background)); + mRelativeLayout.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.light_background)); if (sgvLevel == 1) { mSgv.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_highColor)); mDelta.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.light_highColor)); diff --git a/wear/src/main/res/values/colors.xml b/wear/src/main/res/values/colors.xml index 7852f93413..372c343b44 100644 --- a/wear/src/main/res/values/colors.xml +++ b/wear/src/main/res/values/colors.xml @@ -1,10 +1,10 @@ - @color/black - @color/black - @color/grey_50 - @color/black + @color/black + @color/black + @color/grey_50 + @color/black @color/black @color/grey_50 @color/red_600 @@ -12,9 +12,9 @@ @color/grey_50 @color/grey_50 @color/black - @color/black - @color/red_600 - @color/black + @color/black + @color/red_600 + @color/black @color/yellow_700 @color/red_600 @@ -27,13 +27,13 @@ @color/grey_50 @color/grey_50 - @color/black + @color/black @color/grey_50 @color/grey_50 @color/black @color/red_600 - @color/black - @color/red_600 + @color/black + @color/red_600 @color/black @color/yellow_700 @@ -48,8 +48,8 @@ @color/blue_300 - @color/blue_300 - @color/blue_600 + @color/blue_300 + @color/BLUE @@ -352,6 +352,7 @@ + #0000FF #ECEFF1 #CFD8DC #B0BEC5 diff --git a/wear/wear.iml b/wear/wear.iml index 7db2f0c9ea..6bcf7b706c 100644 --- a/wear/wear.iml +++ b/wear/wear.iml @@ -43,13 +43,6 @@ - - - - - - - @@ -58,6 +51,13 @@ + + + + + + + @@ -66,14 +66,6 @@ - - - - - - - - @@ -82,6 +74,14 @@ + + + + + + + +