Files
luna-tracker/app/src/main/res/layout/fragment_daily_summary.xml
Maximilian von Heyden 6a995d6561 Add sleep tracking, statistics module and backup features
Features:
- Sleep tracking with timer and manual duration input
- Statistics module with 5 tabs (daily summary, feeding, diapers, sleep, growth)
- Export/Import backup functionality in settings
- Complete German, French and Italian translations
2026-01-17 21:37:05 +01:00

275 lines
10 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/date_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textColor="@color/accent"
android:textStyle="bold"
android:gravity="center"
android:layout_marginBottom="20dp"/>
<!-- Feeding Card -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/button_background"
android:padding="15dp"
android:layout_marginBottom="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/stats_feeding_title"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/event_bottle_type"
android:textSize="24sp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginStart="10dp">
<TextView
android:id="@+id/bottle_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"/>
<ProgressBar
android:id="@+id/bottle_progress"
android:layout_width="match_parent"
android:layout_height="8dp"
android:layout_marginTop="5dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:progressDrawable="@drawable/progress_bar_accent"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/breastfeeding_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/event_breastfeeding_both_type"
android:textSize="24sp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginStart="10dp">
<TextView
android:id="@+id/breastfeeding_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"/>
<ProgressBar
android:id="@+id/breastfeeding_progress"
android:layout_width="match_parent"
android:layout_height="8dp"
android:layout_marginTop="5dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:progressDrawable="@drawable/progress_bar_accent"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- Sleep Card -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/button_background"
android:padding="15dp"
android:layout_marginBottom="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/stats_sleep_title"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/event_sleep_type"
android:textSize="24sp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginStart="10dp">
<TextView
android:id="@+id/sleep_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"/>
<ProgressBar
android:id="@+id/sleep_progress"
android:layout_width="match_parent"
android:layout_height="8dp"
android:layout_marginTop="5dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:progressDrawable="@drawable/progress_bar_accent"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- Diapers Card -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/button_background"
android:padding="15dp"
android:layout_marginBottom="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/stats_diapers_title"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/event_diaperchange_poo_type"
android:textSize="24sp"/>
<TextView
android:id="@+id/poo_summary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="10dp"
android:textSize="14sp"
android:gravity="center_vertical"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/event_diaperchange_pee_type"
android:textSize="24sp"/>
<TextView
android:id="@+id/pee_summary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="10dp"
android:textSize="14sp"
android:gravity="center_vertical"/>
</LinearLayout>
</LinearLayout>
<!-- Weight/Temperature Card -->
<LinearLayout
android:id="@+id/health_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/button_background"
android:padding="15dp"
android:layout_marginBottom="10dp"
android:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/stats_health_title"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<TextView
android:id="@+id/weight_summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="14sp"/>
<TextView
android:id="@+id/temperature_summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
</LinearLayout>
</LinearLayout>
</ScrollView>