Product Sans is designed to be used for Google product logos. Google Sans is designed to be used for title, header, and body text.
391 lines
20 KiB
XML
391 lines
20 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
>
|
|
<data>
|
|
<variable
|
|
name="viewModel"
|
|
type="com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel" />
|
|
<variable
|
|
name="isGlanceVisible"
|
|
type="Boolean" />
|
|
</data>
|
|
<com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:id="@+id/scrollView"
|
|
android:scrollbarThumbVertical="@color/colorPrimary"
|
|
android:background="@color/colorPrimaryDark">
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="8dp"
|
|
android:paddingBottom="8dp"
|
|
android:orientation="vertical">
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:background="?android:attr/selectableItemBackground"
|
|
android:gravity="center_vertical"
|
|
android:id="@+id/action_show_glance"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="12dp"
|
|
android:src="@drawable/menu"/>
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/AnotherWidget.Settings.Title"
|
|
android:text="@string/title_show_glance"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/show_glance_label"
|
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
</LinearLayout>
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="16dp"
|
|
android:checked="@{isGlanceVisible}"
|
|
android:id="@+id/show_glance_switch"
|
|
android:buttonTint="@color/colorAccent" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:id="@+id/calendar_settings"
|
|
android:alpha="@{isGlanceVisible ? 1f : 0.2f, default=1}"
|
|
android:orientation="vertical">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:text="@string/providers"
|
|
android:textAlignment="viewStart"
|
|
android:paddingLeft="20dp"
|
|
android:paddingRight="20dp"
|
|
android:textSize="16sp"
|
|
android:textColor="@color/colorAccent"
|
|
android:textAppearance="@style/AnotherWidget.Settings.Header"
|
|
app:textAllCaps="false" />
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:background="?android:attr/selectableItemBackground"
|
|
android:gravity="center_vertical"
|
|
android:id="@+id/action_show_music"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="11dp"
|
|
android:src="@drawable/round_music_note"
|
|
app:tint="@color/colorPrimaryText"/>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/AnotherWidget.Settings.Title"
|
|
android:text="@string/settings_show_music_title"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/show_music_label"
|
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
<com.google.android.material.button.MaterialButton
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="36dp"
|
|
style="@style/Widget.MaterialComponents.Button.TextButton"
|
|
android:letterSpacing="0"
|
|
android:textAllCaps="false"
|
|
android:clickable="true"
|
|
android:layout_marginStart="-8dp"
|
|
android:layout_marginBottom="-8dp"
|
|
android:paddingBottom="0dp"
|
|
android:paddingTop="0dp"
|
|
android:focusable="true"
|
|
android:visibility="gone"
|
|
android:id="@+id/notification_permission_alert"
|
|
android:textColor="@color/errorColorText"
|
|
android:text="@string/action_grant_permission"/>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:background="?android:attr/selectableItemBackground"
|
|
android:gravity="center_vertical"
|
|
android:id="@+id/action_show_next_alarm"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="12dp"
|
|
android:src="@drawable/round_alarm"
|
|
app:tint="@color/colorPrimaryText"/>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/AnotherWidget.Settings.Title"
|
|
android:text="@string/settings_show_next_alarm_title"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/show_next_alarm_label"
|
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/AnotherWidget.Settings.Title"
|
|
android:textSize="14sp"
|
|
android:visibility="gone"
|
|
android:id="@+id/show_next_alarm_warning"
|
|
android:textColor="@color/warningColorText" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:background="?android:attr/selectableItemBackground"
|
|
android:gravity="center_vertical"
|
|
android:id="@+id/action_show_steps"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="11dp"
|
|
android:src="@drawable/round_directions_walk"
|
|
app:tint="@color/colorPrimaryText"/>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/AnotherWidget.Settings.Title"
|
|
android:text="@string/settings_daily_steps_title"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/show_steps_label"
|
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
<com.google.android.material.button.MaterialButton
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="36dp"
|
|
style="@style/Widget.MaterialComponents.Button.TextButton"
|
|
android:letterSpacing="0"
|
|
android:textAllCaps="false"
|
|
android:clickable="true"
|
|
android:layout_marginStart="-8dp"
|
|
android:layout_marginBottom="-8dp"
|
|
android:paddingBottom="0dp"
|
|
android:paddingTop="0dp"
|
|
android:focusable="true"
|
|
android:visibility="gone"
|
|
android:id="@+id/fitness_permission_alert"
|
|
android:textColor="@color/errorColorText"
|
|
android:text="@string/action_grant_permission"/>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:background="?android:attr/selectableItemBackground"
|
|
android:gravity="center_vertical"
|
|
android:id="@+id/action_show_low_battery_level_warning"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="12dp"
|
|
android:src="@drawable/round_battery_charging_full"
|
|
app:tint="@color/colorPrimaryText"/>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/AnotherWidget.Settings.Title"
|
|
android:text="@string/settings_low_battery_level_title"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/show_low_battery_level_warning_label"
|
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:background="?android:attr/selectableItemBackground"
|
|
android:gravity="center_vertical"
|
|
android:id="@+id/action_show_custom_notes"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="12dp"
|
|
android:src="@drawable/round_notes"
|
|
app:tint="@color/colorPrimaryText"/>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/AnotherWidget.Settings.Title"
|
|
android:text="@string/settings_custom_notes_title"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/show_custom_notes_label"
|
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:text="@string/preferences_header"
|
|
android:textAlignment="viewStart"
|
|
android:paddingLeft="20dp"
|
|
android:paddingRight="20dp"
|
|
android:textSize="16sp"
|
|
android:textColor="@color/colorAccent"
|
|
android:textAppearance="@style/AnotherWidget.Settings.Header"
|
|
app:textAllCaps="false" />
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:background="?android:attr/selectableItemBackground"
|
|
android:gravity="center_vertical"
|
|
android:id="@+id/action_sort_glance_providers"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="12dp"
|
|
android:src="@drawable/round_flip_to_front"
|
|
app:tint="@color/colorPrimaryText"/>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/AnotherWidget.Settings.Title"
|
|
android:text="@string/settings_sort_glance_providers_title"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/settings_sort_glance_providers_subtitle"
|
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/small_clock_warning"
|
|
android:padding="10dp"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_marginBottom="24dp"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp"
|
|
android:padding="10dp"
|
|
android:src="@drawable/outline_info_24"
|
|
app:tint="@color/colorSecondaryText"/>
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:duplicateParentState="true"
|
|
android:textSize="14sp"
|
|
android:layout_marginTop="8dp"
|
|
android:text="@string/glance_info"
|
|
android:textColor="@color/colorSecondaryText"
|
|
android:letterSpacing="0"
|
|
android:fontFamily="@font/google_sans"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
|
app:textAllCaps="false" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
|
|
</layout> |