Update the UI
This commit is contained in:
@ -7,9 +7,12 @@
|
||||
<variable
|
||||
name="isCalendarEnabled"
|
||||
type="Boolean" />
|
||||
<variable
|
||||
name="isDiffEnabled"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<ScrollView
|
||||
<com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -158,7 +161,8 @@
|
||||
android:src="@drawable/round_date_range"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
@ -174,6 +178,12 @@
|
||||
android:id="@+id/all_day_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:id="@+id/show_all_day_toggle"
|
||||
android:buttonTint="@color/colorAccent" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -195,7 +205,8 @@
|
||||
android:src="@drawable/round_event_busy"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
@ -211,6 +222,12 @@
|
||||
android:id="@+id/show_declined_events_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:id="@+id/show_declined_events_toggle"
|
||||
android:buttonTint="@color/colorAccent" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -281,7 +298,8 @@
|
||||
android:src="@drawable/round_timelapse"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
@ -297,6 +315,12 @@
|
||||
android:id="@+id/show_diff_time_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:id="@+id/show_diff_time_toggle"
|
||||
android:buttonTint="@color/colorAccent" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -307,6 +331,7 @@
|
||||
android:paddingRight="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:alpha="@{isDiffEnabled ? 1f : 0.2f, default=1}"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/action_widget_update_frequency"
|
||||
@ -404,7 +429,8 @@
|
||||
android:src="@drawable/round_code"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
@ -420,6 +446,12 @@
|
||||
android:id="@+id/show_multiple_events_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:id="@+id/show_multiple_events_toggle"
|
||||
android:buttonTint="@color/colorAccent" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -497,5 +529,5 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
|
||||
</layout>
|
@ -8,7 +8,7 @@
|
||||
name="isClockVisible"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
<ScrollView
|
||||
<com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -20,6 +20,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
@ -77,8 +78,7 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/round_schedule"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
android:src="@drawable/alarm"/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
@ -230,7 +230,8 @@
|
||||
android:scaleX="-1"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
@ -246,6 +247,12 @@
|
||||
android:id="@+id/ampm_indicator_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:id="@+id/ampm_indicator_toggle"
|
||||
android:buttonTint="@color/colorAccent" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -356,5 +363,5 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
|
||||
</layout>
|
@ -6,7 +6,7 @@
|
||||
name="viewModel"
|
||||
type="com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel" />
|
||||
</data>
|
||||
<ScrollView
|
||||
<com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/scrollView"
|
||||
@ -334,7 +334,8 @@
|
||||
android:rotation="90"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
@ -350,6 +351,12 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:id="@+id/show_dividers_toggle"
|
||||
android:buttonTint="@color/colorAccent" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -392,5 +399,5 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
|
||||
</layout>
|
@ -10,7 +10,7 @@
|
||||
name="isGlanceVisible"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
<ScrollView
|
||||
<com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/scrollView"
|
||||
@ -39,8 +39,7 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/round_hourglass_empty"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
android:src="@drawable/menu"/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
@ -382,5 +381,5 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
|
||||
</layout>
|
@ -49,7 +49,7 @@
|
||||
tools:ignore="RelativeOverlap" />
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<ScrollView
|
||||
<com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/scrollView"
|
||||
@ -126,7 +126,8 @@
|
||||
android:src="@drawable/round_compare"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
@ -142,6 +143,12 @@
|
||||
android:id="@+id/show_widget_preview_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:id="@+id/show_widget_preview_toggle"
|
||||
android:buttonTint="@color/colorAccent" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -163,7 +170,8 @@
|
||||
android:src="@drawable/round_wallpaper"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
@ -179,6 +187,12 @@
|
||||
android:id="@+id/show_wallpaper_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:id="@+id/show_wallpaper_toggle"
|
||||
android:buttonTint="@color/colorAccent" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -440,6 +454,6 @@
|
||||
app:textAllCaps="false" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
|
||||
</LinearLayout>
|
||||
</layout>
|
@ -8,7 +8,7 @@
|
||||
name="isWeatherVisible"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
<ScrollView
|
||||
<com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -77,6 +77,7 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:id="@+id/weather_icon_pack"
|
||||
android:src="@drawable/round_brightness_5"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
@ -327,8 +328,7 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:id="@+id/weather_icon_pack"
|
||||
android:src="@drawable/round_cloud_queue"
|
||||
android:src="@drawable/round_cloud_circle"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -399,5 +399,5 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
|
||||
</layout>
|
15
app/src/main/res/layout/settings_menu_header.xml
Normal file
15
app/src/main/res/layout/settings_menu_header.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:text="@string/filters_header"
|
||||
android:textAlignment="viewStart"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:textSize="16sp"
|
||||
android:id="@+id/header"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:textAppearance="@style/AnotherWidget.Settings.Header"
|
||||
android:textAllCaps="false" />
|
61
app/src/main/res/layout/settings_menu_item.xml
Normal file
61
app/src/main/res/layout/settings_menu_item.xml
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/container"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:id="@+id/icon"
|
||||
android:src="@drawable/calendar"/>
|
||||
<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:id="@+id/title"
|
||||
android:text="@string/title_permission_calendar"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/label"
|
||||
android:text="@string/description_permission_calendar"
|
||||
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:id="@+id/action_grant_permission"
|
||||
android:textColor="@color/errorColorText"
|
||||
android:text="@string/action_grant_permission"/>
|
||||
</LinearLayout>
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:id="@+id/toggle"
|
||||
android:buttonTint="@color/colorAccent" />
|
||||
</LinearLayout>
|
Reference in New Issue
Block a user