mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-02-01 03:32:17 +01:00
43fddd0110
This adds a new dashboard-type view to Gadgetbridge. The new dashboard activity displays several widgets with aggregated statistics from multiple devices. New preferences are added to allow configuration of the dashboard and its widgets. A new bottom navigation bar is added to switch between the Dashboard and Devices views. Some issues that prompted this feature and provided inspiration for the implementation: - https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/301 (More Intuitive User Interface) - https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/3074 (Ability to merge historical data from several devices) Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3478 Reviewed-by: José Rebelo <joserebelo@noreply.codeberg.org> Co-authored-by: Arjan Schrijver <a_gadgetbridge@anymore.nl> Co-committed-by: Arjan Schrijver <a_gadgetbridge@anymore.nl>
144 lines
6.6 KiB
XML
144 lines
6.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
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="wrap_content">
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/card_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
app:cardBackgroundColor="?attr/cardview_background_color"
|
|
app:cardElevation="3dp">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="16dp">
|
|
|
|
<TextView
|
|
android:id="@+id/alarm_item_time"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentStart="true"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginBottom="8dp"
|
|
android:layout_marginEnd="0dp"
|
|
android:text="00:00"
|
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
|
|
|
<TextView
|
|
android:id="@+id/alarm_smart_wakeup"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignBaseline="@+id/alarm_item_time"
|
|
android:layout_toEndOf="@+id/alarm_item_time"
|
|
android:text="(Smart)"
|
|
android:visibility="invisible" />
|
|
|
|
<com.google.android.material.materialswitch.MaterialSwitch
|
|
android:id="@+id/alarm_item_toggle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentEnd="true"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_marginEnd="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/dowSelector"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@+id/alarm_item_time"
|
|
android:baselineAligned="false"
|
|
android:orientation="horizontal">
|
|
|
|
<androidx.appcompat.widget.AppCompatCheckedTextView
|
|
android:id="@+id/alarm_item_monday"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_weight="1"
|
|
android:textColor="@color/alarm_dow"
|
|
android:gravity="center"
|
|
android:text="@string/alarm_mon_short"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
<androidx.appcompat.widget.AppCompatCheckedTextView
|
|
android:id="@+id/alarm_item_tuesday"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_weight="1"
|
|
android:textColor="@color/alarm_dow"
|
|
android:gravity="center"
|
|
android:text="@string/alarm_tue_short"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
<androidx.appcompat.widget.AppCompatCheckedTextView
|
|
android:id="@+id/alarm_item_wednesday"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_weight="1"
|
|
android:textColor="@color/alarm_dow"
|
|
android:gravity="center"
|
|
android:text="@string/alarm_wed_short"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
<androidx.appcompat.widget.AppCompatCheckedTextView
|
|
android:id="@+id/alarm_item_thursday"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_weight="1"
|
|
android:textColor="@color/alarm_dow"
|
|
android:gravity="center"
|
|
android:text="@string/alarm_thu_short"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
<androidx.appcompat.widget.AppCompatCheckedTextView
|
|
android:id="@+id/alarm_item_friday"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_weight="1"
|
|
android:textColor="@color/alarm_dow"
|
|
android:gravity="center"
|
|
android:text="@string/alarm_fri_short"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
<androidx.appcompat.widget.AppCompatCheckedTextView
|
|
android:id="@+id/alarm_item_saturday"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_weight="1"
|
|
android:textColor="@color/alarm_dow"
|
|
android:gravity="center"
|
|
android:text="@string/alarm_sat_short"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
<androidx.appcompat.widget.AppCompatCheckedTextView
|
|
android:id="@+id/alarm_item_sunday"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_weight="1"
|
|
android:textColor="@color/alarm_dow"
|
|
android:gravity="center"
|
|
android:text="@string/alarm_sun_short"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
</LinearLayout>
|
|
|
|
</RelativeLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|