mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-04 01:09:47 +01:00
Some more translations + reoder live activity layout
This commit is contained in:
parent
27aa660ca4
commit
0d27245dd1
@ -4,13 +4,11 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.github.mikephil.charting.charts.BarLineChartBase;
|
||||
import com.github.mikephil.charting.charts.Chart;
|
||||
@ -93,10 +91,10 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
|
||||
}
|
||||
}
|
||||
|
||||
protected ActivityConfig akActivity = new ActivityConfig(ActivityKind.TYPE_ACTIVITY, "Activity", Color.rgb(89, 178, 44));
|
||||
protected ActivityConfig akLightSleep = new ActivityConfig(ActivityKind.TYPE_LIGHT_SLEEP, "Light Sleep", Color.rgb(182, 191, 255));
|
||||
protected ActivityConfig akDeepSleep = new ActivityConfig(ActivityKind.TYPE_DEEP_SLEEP, "Deep Sleep", Color.rgb(76, 90, 255));
|
||||
protected ActivityConfig akNotWorn = new ActivityConfig(ActivityKind.TYPE_NOT_WORN, "Not Worn", Color.rgb(84, 82, 84));
|
||||
protected ActivityConfig akActivity;
|
||||
protected ActivityConfig akLightSleep;
|
||||
protected ActivityConfig akDeepSleep;
|
||||
protected ActivityConfig akNotWorn;
|
||||
|
||||
|
||||
protected int BACKGROUND_COLOR;
|
||||
@ -122,7 +120,7 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
initColors();
|
||||
init();
|
||||
|
||||
IntentFilter filter = new IntentFilter();
|
||||
for (String action : mIntentFilterActions) {
|
||||
@ -131,7 +129,7 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
|
||||
LocalBroadcastManager.getInstance(getActivity()).registerReceiver(mReceiver, filter);
|
||||
}
|
||||
|
||||
protected void initColors() {
|
||||
protected void init() {
|
||||
BACKGROUND_COLOR = getResources().getColor(R.color.background_material_light);
|
||||
DESCRIPTION_COLOR = getResources().getColor(R.color.primarytext);
|
||||
CHART_TEXT_COLOR = getResources().getColor(R.color.secondarytext);
|
||||
@ -141,10 +139,10 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
|
||||
AK_LIGHT_SLEEP_COLOR = getResources().getColor(R.color.chart_deep_sleep_light);
|
||||
AK_NOT_WORN_COLOR = getResources().getColor(R.color.chart_not_worn_light);
|
||||
|
||||
akActivity.color = AK_ACTIVITY_COLOR;
|
||||
akLightSleep.color = AK_LIGHT_SLEEP_COLOR;
|
||||
akDeepSleep.color = AK_DEEP_SLEEP_COLOR;
|
||||
akNotWorn.color = AK_NOT_WORN_COLOR;
|
||||
akActivity = new ActivityConfig(ActivityKind.TYPE_ACTIVITY, getString(R.string.abstract_chart_fragment_kind_activity), AK_ACTIVITY_COLOR);
|
||||
akLightSleep = new ActivityConfig(ActivityKind.TYPE_LIGHT_SLEEP, getString(R.string.abstract_chart_fragment_kind_light_sleep), AK_LIGHT_SLEEP_COLOR);
|
||||
akDeepSleep = new ActivityConfig(ActivityKind.TYPE_DEEP_SLEEP, getString(R.string.abstract_chart_fragment_kind_deep_sleep), AK_DEEP_SLEEP_COLOR);
|
||||
akNotWorn = new ActivityConfig(ActivityKind.TYPE_NOT_WORN, getString(R.string.abstract_chart_fragment_kind_not_worn), AK_NOT_WORN_COLOR);
|
||||
}
|
||||
|
||||
private void setStartDate(Date date) {
|
||||
|
@ -10,18 +10,19 @@
|
||||
android:layout_weight="20">
|
||||
|
||||
<nodomain.freeyourgadget.gadgetbridge.activities.charts.CustomBarChart
|
||||
android:id="@+id/livechart_steps_total"
|
||||
android:id="@+id/livechart_steps_per_minute_current"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="20">
|
||||
</nodomain.freeyourgadget.gadgetbridge.activities.charts.CustomBarChart>
|
||||
|
||||
<nodomain.freeyourgadget.gadgetbridge.activities.charts.CustomBarChart
|
||||
android:id="@+id/livechart_steps_per_minute_current"
|
||||
android:id="@+id/livechart_steps_total"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="20">
|
||||
</nodomain.freeyourgadget.gadgetbridge.activities.charts.CustomBarChart>
|
||||
|
||||
<!--
|
||||
<com.github.mikephil.charting.charts.PieChart
|
||||
android:id="@+id/livechart_steps_total"
|
||||
|
@ -180,4 +180,17 @@
|
||||
<string name="weeksteps_today_steps_description">Schritte heute, Ziel: %1$s</string>
|
||||
<string name="pref_title_dont_ack_transfer">Transfer von Aktivitätsdaten nicht bestätigen</string>
|
||||
<string name="pref_summary_dont_ack_transfers">Wenn der Transfer der Aktivitätsdaten nicht bestätigt wird, werden die Daten nicht auf dem Mi Band gelöscht. Das ist Sinnvoll, wenn neben Gadgetbridge noch andere Apps auf das Mi Band zugreifen.</string>
|
||||
<string name="abstract_chart_fragment_kind_activity">Aktivität</string>
|
||||
<string name="abstract_chart_fragment_kind_deep_sleep">Tiefschlaf</string>
|
||||
<string name="abstract_chart_fragment_kind_light_sleep">Leichter Schlaf</string>
|
||||
<string name="abstract_chart_fragment_kind_not_worn">Nicht getragen</string>
|
||||
<string name="battery_full">Voll aufgeladen</string>
|
||||
<string name="battery_low">Akku fast leer</string>
|
||||
<string name="battery_medium">Akku mittelvoll</string>
|
||||
<string name="battery_not_charging">Akku wird nicht geladen</string>
|
||||
<string name="live_activity_current_steps_per_minute">Aktuelle Schritte/Minute</string>
|
||||
<string name="live_activity_start_your_activity">Starte Deine Aktivität</string>
|
||||
<string name="live_activity_steps_history">Verlauf der Schritte</string>
|
||||
<string name="live_activity_steps_per_minute_history">Verlauf der Schritte pro Minute</string>
|
||||
<string name="live_activity_total_steps">Gesamtanzahl Schritte</string>
|
||||
</resources>
|
||||
|
@ -202,4 +202,8 @@
|
||||
<string name="live_activity_total_steps">Total Steps</string>
|
||||
<string name="live_activity_steps_per_minute_history">Steps per minute history</string>
|
||||
<string name="live_activity_start_your_activity">Start your activity</string>
|
||||
<string name="abstract_chart_fragment_kind_activity">Activity</string>
|
||||
<string name="abstract_chart_fragment_kind_light_sleep">Light Sleep</string>
|
||||
<string name="abstract_chart_fragment_kind_deep_sleep">Deep Sleep</string>
|
||||
<string name="abstract_chart_fragment_kind_not_worn">Not Worn</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user