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
This commit is contained in:
2026-01-08 09:33:36 +01:00
parent 587fc5d3e3
commit 6a995d6561
32 changed files with 2841 additions and 9 deletions

View File

@@ -16,6 +16,15 @@
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/button_statistics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_gravity="end"
android:src="@drawable/ic_statistics"
app:tint="@color/grey"/>
<ImageView
android:id="@+id/button_settings"
android:layout_width="wrap_content"

View File

@@ -170,6 +170,44 @@
android:layout_marginTop="5dp"
android:text="@string/settings_no_breastfeeding_desc"/>
<!-- Data Backup Section -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="bold"
android:layout_marginTop="30dp"
android:text="@string/settings_backup_title"/>
<Button
android:id="@+id/settings_export"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/button_background"
android:textColor="@color/accent"
android:text="@string/settings_export"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:text="@string/settings_export_desc"/>
<Button
android:id="@+id/settings_import"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/button_background"
android:textColor="@color/accent"
android:text="@string/settings_import"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:text="@string/settings_import_desc"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingHorizontal="15dp">
<ImageView
android:id="@+id/button_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:src="@drawable/ic_back"
app:tint="@color/grey"/>
<TextView
android:id="@+id/statistics_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/statistics_title"
android:textSize="22sp"
android:gravity="center"/>
<Spinner
android:id="@+id/period_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="80dp"/>
</LinearLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
app:tabMode="scrollable"
app:tabGravity="start"
app:tabTextColor="@color/grey"
app:tabSelectedTextColor="@color/accent"
app:tabIndicatorColor="@color/accent"/>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>

View File

@@ -0,0 +1,274 @@
<?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>

View File

@@ -0,0 +1,129 @@
<?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">
<!-- Daily Chart -->
<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_per_day"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<LinearLayout
android:id="@+id/chart_container"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:gravity="bottom"/>
<LinearLayout
android:id="@+id/chart_labels"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp"
android:gravity="center">
<View
android:layout_width="16dp"
android:layout_height="16dp"
android:background="@color/accent"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="20dp"
android:text="@string/stats_poo"
android:textSize="12sp"/>
<View
android:layout_width="16dp"
android:layout_height="16dp"
android:background="#66FFE68F"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/stats_pee"
android:textSize="12sp"/>
</LinearLayout>
</LinearLayout>
<!-- Summary Stats -->
<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_summary"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<TextView
android:id="@+id/avg_diapers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="14sp"/>
<TextView
android:id="@+id/avg_poo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
<TextView
android:id="@+id/avg_pee"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
<TextView
android:id="@+id/last_poo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:textSize="14sp"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -0,0 +1,175 @@
<?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">
<!-- Daily Chart -->
<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_daily_intake"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<LinearLayout
android:id="@+id/chart_container"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:gravity="bottom"/>
<LinearLayout
android:id="@+id/chart_labels"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"/>
</LinearLayout>
<!-- Bottle Stats -->
<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_bottle_title"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<TextView
android:id="@+id/bottle_avg_daily"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="14sp"/>
<TextView
android:id="@+id/feeding_interval"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
</LinearLayout>
<!-- Breastfeeding Stats -->
<LinearLayout
android:id="@+id/breastfeeding_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">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/stats_breastfeeding_title"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<TextView
android:id="@+id/breastfeeding_avg_duration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="14sp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="@string/stats_side_distribution"
android:textSize="14sp"
android:textStyle="bold"/>
<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/stats_left"
android:textSize="14sp"/>
<ProgressBar
android:id="@+id/left_progress"
android:layout_width="0dp"
android:layout_height="16dp"
android:layout_weight="1"
android:layout_marginHorizontal="10dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:progressDrawable="@drawable/progress_bar_accent"/>
<TextView
android:id="@+id/left_percent"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:textSize="14sp"
android:gravity="end"/>
</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/stats_right"
android:textSize="14sp"/>
<ProgressBar
android:id="@+id/right_progress"
android:layout_width="0dp"
android:layout_height="16dp"
android:layout_weight="1"
android:layout_marginHorizontal="10dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:progressDrawable="@drawable/progress_bar_accent"/>
<TextView
android:id="@+id/right_percent"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:textSize="14sp"
android:gravity="end"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -0,0 +1,100 @@
<?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">
<!-- Weight Chart -->
<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_weight_curve"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<LinearLayout
android:id="@+id/chart_container"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:gravity="bottom"/>
<LinearLayout
android:id="@+id/chart_labels"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"/>
</LinearLayout>
<!-- Weight Summary -->
<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_weight_summary"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<TextView
android:id="@+id/current_weight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="20sp"
android:textStyle="bold"/>
<TextView
android:id="@+id/weight_gain_week"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="14sp"/>
<TextView
android:id="@+id/weight_gain_month"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
</LinearLayout>
<!-- No Data Message -->
<TextView
android:id="@+id/no_data_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="40dp"
android:text="@string/stats_no_weight_data"
android:textSize="16sp"
android:textColor="@color/grey"
android:visibility="gone"/>
</LinearLayout>
</ScrollView>

View File

@@ -0,0 +1,106 @@
<?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">
<!-- Daily Chart -->
<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_per_day"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<LinearLayout
android:id="@+id/chart_container"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:gravity="bottom"/>
<LinearLayout
android:id="@+id/chart_labels"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"/>
</LinearLayout>
<!-- Sleep Summary -->
<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_analysis"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/accent"/>
<TextView
android:id="@+id/avg_sleep_per_day"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="14sp"/>
<TextView
android:id="@+id/avg_naps_per_day"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
<TextView
android:id="@+id/avg_nap_duration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
<TextView
android:id="@+id/longest_sleep"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textSize="14sp"/>
</LinearLayout>
<!-- No Data Message -->
<TextView
android:id="@+id/no_data_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="40dp"
android:text="@string/stats_no_sleep_data"
android:textSize="16sp"
android:textColor="@color/grey"
android:visibility="gone"/>
</LinearLayout>
</ScrollView>

View File

@@ -10,10 +10,20 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/button_sleep"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:background="@drawable/dropdown_list_item_background"
style="@style/OverflowMenuText"
android:text="@string/overflow_event_sleep"/>
<TextView
android:id="@+id/button_medicine"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:padding="10dp"
android:background="@drawable/dropdown_list_item_background"
style="@style/OverflowMenuText"

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center">
<NumberPicker
android:id="@+id/sleep_duration_picker"
android:layout_width="100dp"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/measurement_unit_time_minutes"/>
</LinearLayout>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:padding="20dp">
<TextView
android:id="@+id/sleep_emoji"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/event_sleep_type"
android:textSize="60sp"/>
<TextView
android:id="@+id/sleep_timer_display"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textSize="48sp"
android:textColor="@color/accent"
android:fontFamily="monospace"
android:text="00:00"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="14sp"
android:textColor="@color/grey"
android:text="@string/sleep_timer_hint"/>
</LinearLayout>