mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-27 19:15:50 +01:00
Restore sleep balance on weekly and monthly charts
This commit is contained in:
parent
b2b79c99cd
commit
5531ddc49a
@ -126,6 +126,8 @@ public class WeekSleepChartFragment extends AbstractWeekChartFragment {
|
||||
lightSleepTimeText = rootView.findViewById(R.id.sleep_chart_legend_light_time);
|
||||
sleepDatesText = rootView.findViewById(R.id.sleep_dates);
|
||||
|
||||
mBalanceView = rootView.findViewById(R.id.balance);
|
||||
|
||||
setupWeekChart();
|
||||
|
||||
// refresh immediately instead of use refreshIfVisible(), for perceived performance
|
||||
@ -186,6 +188,8 @@ public class WeekSleepChartFragment extends AbstractWeekChartFragment {
|
||||
String toFormattedDate = new SimpleDateFormat("E, MMM dd").format(to);
|
||||
String fromFormattedDate = new SimpleDateFormat("E, MMM dd").format(from);
|
||||
sleepDatesText.setText(fromFormattedDate + " - " + toFormattedDate);
|
||||
|
||||
mBalanceView.setText(mcd.getWeekBeforeData().getBalanceMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,6 +19,17 @@
|
||||
android:layout_marginBottom="10dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:id="@+id/balance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:background="@color/gauge_line_color"
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
Reference in New Issue
Block a user