mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-27 09:01:38 +01:00
Merge branch 'master' into new_GUI
This commit is contained in:
commit
d087e2142d
@ -7,7 +7,7 @@
|
|||||||
* Mi Band 2: Initial support for heart rate readings (Debug activity only)
|
* Mi Band 2: Initial support for heart rate readings (Debug activity only)
|
||||||
* Mi Band 2: Support disabled alarms
|
* Mi Band 2: Support disabled alarms
|
||||||
* Attempt to fix spurious device discovery problems
|
* Attempt to fix spurious device discovery problems
|
||||||
* Update MPAndroidChart to release 3.0
|
* Correctly recognize Toffeed, Slimsocial and MaterialFBook as facebook notification sources
|
||||||
|
|
||||||
####Version 0.13.6
|
####Version 0.13.6
|
||||||
* Mi Band 2: Support for multiple alarms (3 at the moment)
|
* Mi Band 2: Support for multiple alarms (3 at the moment)
|
||||||
|
@ -8,7 +8,9 @@ import android.os.AsyncTask;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v4.app.FragmentActivity;
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
|
import android.util.TypedValue;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import com.github.mikephil.charting.charts.BarChart;
|
import com.github.mikephil.charting.charts.BarChart;
|
||||||
@ -155,15 +157,20 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void init() {
|
protected void init() {
|
||||||
|
TypedValue runningColor = new TypedValue();
|
||||||
BACKGROUND_COLOR = GBApplication.getBackgroundColor(getContext());
|
BACKGROUND_COLOR = GBApplication.getBackgroundColor(getContext());
|
||||||
LEGEND_TEXT_COLOR = DESCRIPTION_COLOR = GBApplication.getTextColor(getContext());
|
LEGEND_TEXT_COLOR = DESCRIPTION_COLOR = GBApplication.getTextColor(getContext());
|
||||||
CHART_TEXT_COLOR = getResources().getColor(R.color.secondarytext);
|
CHART_TEXT_COLOR = ContextCompat.getColor(getContext(), R.color.secondarytext);
|
||||||
HEARTRATE_COLOR = getResources().getColor(R.color.chart_heartrate);
|
HEARTRATE_COLOR = ContextCompat.getColor(getContext(), R.color.chart_heartrate);
|
||||||
HEARTRATE_FILL_COLOR = getResources().getColor(R.color.chart_heartrate_fill);
|
HEARTRATE_FILL_COLOR = ContextCompat.getColor(getContext(), R.color.chart_heartrate_fill);
|
||||||
AK_ACTIVITY_COLOR = getResources().getColor(R.color.chart_activity_light);
|
getContext().getTheme().resolveAttribute(R.attr.chart_activity, runningColor, true);
|
||||||
AK_DEEP_SLEEP_COLOR = getResources().getColor(R.color.chart_light_sleep_light);
|
AK_ACTIVITY_COLOR = runningColor.data;
|
||||||
AK_LIGHT_SLEEP_COLOR = getResources().getColor(R.color.chart_deep_sleep_light);
|
getContext().getTheme().resolveAttribute(R.attr.chart_light_sleep, runningColor, true);
|
||||||
AK_NOT_WORN_COLOR = getResources().getColor(R.color.chart_not_worn_light);
|
AK_DEEP_SLEEP_COLOR = runningColor.data;
|
||||||
|
getContext().getTheme().resolveAttribute(R.attr.chart_deep_sleep, runningColor, true);
|
||||||
|
AK_LIGHT_SLEEP_COLOR = runningColor.data;
|
||||||
|
getContext().getTheme().resolveAttribute(R.attr.chart_not_worn, runningColor, true);
|
||||||
|
AK_NOT_WORN_COLOR = runningColor.data;
|
||||||
|
|
||||||
HEARTRATE_LABEL = getContext().getString(R.string.charts_legend_heartrate);
|
HEARTRATE_LABEL = getContext().getString(R.string.charts_legend_heartrate);
|
||||||
|
|
||||||
|
7
app/src/main/res/values/attrs.xml
Normal file
7
app/src/main/res/values/attrs.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<attr name="chart_deep_sleep" format="color" />
|
||||||
|
<attr name="chart_light_sleep" format="color" />
|
||||||
|
<attr name="chart_activity" format="color" />
|
||||||
|
<attr name="chart_not_worn" format="color" />
|
||||||
|
</resources>
|
@ -32,7 +32,7 @@
|
|||||||
<string name="appmananger_app_delete">Delete</string>
|
<string name="appmananger_app_delete">Delete</string>
|
||||||
<string name="appmananger_app_delete_cache">Delete and remove from cache</string>
|
<string name="appmananger_app_delete_cache">Delete and remove from cache</string>
|
||||||
<string name="appmananger_app_reinstall">Reinstall</string>
|
<string name="appmananger_app_reinstall">Reinstall</string>
|
||||||
<string name="appmanager_app_openinstore">Open in Pebble Appstore</string>
|
<string name="appmanager_app_openinstore">Search in Pebble Appstore</string>
|
||||||
<string name="appmanager_health_activate">Activate</string>
|
<string name="appmanager_health_activate">Activate</string>
|
||||||
<string name="appmanager_health_deactivate">Deactivate</string>
|
<string name="appmanager_health_deactivate">Deactivate</string>
|
||||||
<string name="app_configure">Configure</string>
|
<string name="app_configure">Configure</string>
|
||||||
|
@ -8,12 +8,10 @@
|
|||||||
<item name="android:textColorTertiary">@color/tertiarytext_light</item>
|
<item name="android:textColorTertiary">@color/tertiarytext_light</item>
|
||||||
<item name="colorAccent">@color/accent</item>
|
<item name="colorAccent">@color/accent</item>
|
||||||
|
|
||||||
<!-- unfortunately it doesn't work this way :( -->
|
|
||||||
<!--
|
|
||||||
<item name="chart_deep_sleep">@color/chart_deep_sleep_light</item>
|
<item name="chart_deep_sleep">@color/chart_deep_sleep_light</item>
|
||||||
<item name="chart_light_sleep">@color/chart_light_sleep_light</item>
|
<item name="chart_light_sleep">@color/chart_light_sleep_light</item>
|
||||||
<item name="chart_activity">@color/chart_activity_light</item>
|
<item name="chart_activity">@color/chart_activity_light</item>
|
||||||
-->
|
<item name="chart_not_worn">@color/chart_not_worn_light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="GadgetbridgeTheme.NoActionBar">
|
<style name="GadgetbridgeTheme.NoActionBar">
|
||||||
@ -30,12 +28,10 @@
|
|||||||
<item name="android:textColorTertiary">@color/tertiarytext_dark</item>
|
<item name="android:textColorTertiary">@color/tertiarytext_dark</item>
|
||||||
<item name="colorAccent">@color/accent</item>
|
<item name="colorAccent">@color/accent</item>
|
||||||
|
|
||||||
<!-- unfortunately it doesn't work this way :( -->
|
|
||||||
<!--
|
|
||||||
<item name="chart_deep_sleep">@color/chart_deep_sleep_dark</item>
|
<item name="chart_deep_sleep">@color/chart_deep_sleep_dark</item>
|
||||||
<item name="chart_light_sleep">@color/chart_light_sleep_dark</item>
|
<item name="chart_light_sleep">@color/chart_light_sleep_dark</item>
|
||||||
<item name="chart_activity">@color/chart_activity_dark</item>
|
<item name="chart_activity">@color/chart_activity_dark</item>
|
||||||
-->
|
<item name="chart_not_worn">@color/chart_not_worn_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="GadgetbridgeThemeDark.NoActionBar">
|
<style name="GadgetbridgeThemeDark.NoActionBar">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<change>Mi Band 2: Initial support for heart rate readings (Debug activity only)</change>
|
<change>Mi Band 2: Initial support for heart rate readings (Debug activity only)</change>
|
||||||
<change>Mi Band 2: Support disabled alarms</change>
|
<change>Mi Band 2: Support disabled alarms</change>
|
||||||
<change>Attempt to fix spurious device discovery problems</change>
|
<change>Attempt to fix spurious device discovery problems</change>
|
||||||
<change>Update MPAndroidChart to release 3.0</change>
|
<change>Correctly recognize Toffeed, Slimsocial and MaterialFBook as facebook notification sources</change>
|
||||||
</release>
|
</release>
|
||||||
<release version="0.13.6" versioncode="68">
|
<release version="0.13.6" versioncode="68">
|
||||||
<change>Mi Band 2: Support multiple alarms (3 at the moment)</change>
|
<change>Mi Band 2: Support multiple alarms (3 at the moment)</change>
|
||||||
|
Loading…
Reference in New Issue
Block a user