303 lines
15 KiB
XML
303 lines
15 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>
|
|
<ScrollView
|
|
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/round_hourglass_empty"
|
|
android:tint="@color/colorPrimaryText"/>
|
|
<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_clock_label"
|
|
android:text="@string/description_show_glance"
|
|
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="1dp"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginStart="16dp"
|
|
android:layout_marginEnd="16dp"
|
|
android:background="@color/disabledButtonBackground" />
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_marginStart="16dp"
|
|
android:layout_marginEnd="16dp"
|
|
android:background="@color/colorPrimary" />
|
|
<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">
|
|
<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="10dp"
|
|
android:src="@drawable/round_music_note"
|
|
android: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"
|
|
android: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:visibility="gone"
|
|
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"
|
|
android: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"
|
|
android: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>
|
|
<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"
|
|
android: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>
|
|
</LinearLayout>
|
|
</ScrollView>
|
|
</layout> |