1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-30 12:35:48 +01:00

Indicate that more items are available in Sleep sessions list in Sleep charts

This commit is contained in:
vanous 2022-07-31 10:53:12 +02:00
parent 46f0187634
commit 03fecd7aa7
3 changed files with 9 additions and 2 deletions

View File

@ -296,11 +296,13 @@ public class SleepChartFragment extends AbstractChartFragment {
result.append(getContext().getString(R.string.you_did_not_sleep));
} else {
for (SleepSession sleepSession : pieData.getSleepSessions()) {
if (result.length() > 0) {
result.append('\n');
}
result.append(getContext().getString(
R.string.you_slept,
DateTimeUtils.timeToString(sleepSession.getSleepStart()),
DateTimeUtils.timeToString(sleepSession.getSleepEnd())));
result.append('\n');
}
}
return result.toString();
@ -530,4 +532,4 @@ public class SleepChartFragment extends AbstractChartFragment {
public float getIntensityTotal() { return intensityTotal;}
}
}
}

View File

@ -15,6 +15,9 @@
android:id="@+id/sleepchart_info"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:maxLines="3"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbarFadeDuration="0"
android:layout_weight="90" />
<LinearLayout

View File

@ -16,6 +16,8 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:maxLines="3"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbarFadeDuration="0"
android:scrollbars="vertical" />
<com.github.mikephil.charting.charts.PieChart