Files
Gadgetbridge/app/src/main/res/layout/item_calendar_selection.xml
T
jrthomas270andJosé Rebelo 2fbef85753 Calendar Sync: Add the option to filter events
This change adds filter filters to the calendar sync options:
  1. Declined events
  2. Canceled events
  3. Color Label filtering
  4. Focus Time event filtering
  5. Working Location event filtering
  6. All Day Event filtering

This changes also inverts the menu for teh sync black list so that is
now a white list. The underlying prefs variables have not changed, just
how the interface displays them so existing user settings will carry
over.

The color label filtering is more useful on calendars from Google
Workspace Calendars that actually have named colors. There is no way
that I can find to access the names of the colors to show to the user,
but it can still be useful to tag some events that you don't want synced.

In addition to the color filters, Google Workspace Calendar has extended
parameters called Focus Time and Working Location. Working location
appears as an all day event every day and if you use the Focus Time as a
Calendar block, your calendar may be filled with these events. For my
work calendar these two event types choke out the "real" events, so it
is nice to filter them.
2026-01-02 00:07:07 +01:00

78 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
android:orientation="horizontal"
android:scrollHorizontally="false">
<RelativeLayout
android:id="@+id/calendar_entry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toStartOf="@+id/calendar_color_drop_down"
android:layout_alignParentStart="true"
android:background="?android:attr/activatedBackgroundIndicator"
android:minHeight="56dp">
<CheckBox
android:id="@+id/item_checkbox"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentStart="true"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:focusable="false" />
<View
android:id="@+id/calendar_color"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_toEndOf="@+id/item_checkbox"
android:paddingTop="8dp"
android:paddingBottom="8dp" />
<LinearLayout
android:id="@+id/calendar_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/calendar_color"
android:orientation="vertical"
android:padding="8dp">
<TextView
android:id="@+id/calendar_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:scrollHorizontally="false"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
<TextView
android:id="@+id/calendar_owner_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:scrollHorizontally="false"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textSize="12sp" />
</LinearLayout>
</RelativeLayout>
<ImageView
android:id="@+id/calendar_color_drop_down"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="4dp"
android:background="?android:attr/selectableItemBackground"
android:focusable="false"
android:clickable="false"
android:padding="8dp"
app:srcCompat="@drawable/ic_more_vert" />
</RelativeLayout>