286 lines
14 KiB
XML
286 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
<data>
|
|
<variable
|
|
name="viewModel"
|
|
type="com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel" />
|
|
<variable
|
|
name="isClockVisible"
|
|
type="Boolean" />
|
|
</data>
|
|
<ScrollView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
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">
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="match_parent"
|
|
app:cardElevation="0dp"
|
|
app:cardCornerRadius="9dp"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginBottom="8dp"
|
|
android:layout_marginLeft="16dp"
|
|
android:layout_marginRight="16dp"
|
|
android:id="@+id/large_clock_warning"
|
|
android:backgroundTint="@color/disabledButtonBackground"
|
|
android:layout_height="wrap_content">
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingLeft="16dp"
|
|
android:paddingRight="16dp"
|
|
android:duplicateParentState="true"
|
|
android:id="@+id/label"
|
|
android:textSize="16sp"
|
|
android:text="@string/clock_warning"
|
|
android:textColor="@color/colorPrimaryText"
|
|
android:letterSpacing="0"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Button"
|
|
app:textAllCaps="false" />
|
|
<com.google.android.material.button.MaterialButton
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/Widget.MaterialComponents.Button.TextButton"
|
|
android:text="@android:string/ok"
|
|
android:id="@+id/action_hide_large_clock_warning"
|
|
android:textColor="@color/colorPrimaryText"
|
|
android:layout_gravity="end" />
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
<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_clock"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="12dp"
|
|
android:src="@drawable/round_schedule"
|
|
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/title_show_clock"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/show_clock_label"
|
|
android:text="@string/description_show_clock"
|
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/clock_settings"
|
|
android:alpha="@{isClockVisible ? 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_clock_text_size"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="12dp"
|
|
android:src="@drawable/round_text_fields"
|
|
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_clock_text_size_title"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/clock_text_size_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_clock_bottom_margin_size"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="12dp"
|
|
android:src="@drawable/round_format_line_spacing"
|
|
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_clock_bottom_margin_title"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/clock_bottom_margin_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_clock_app"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="12dp"
|
|
android:src="@drawable/round_add_to_home_screen"
|
|
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_clock_app_title"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/clock_app_label"
|
|
style="@style/AnotherWidget.Settings.Subtitle"/>
|
|
</LinearLayout>
|
|
</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:id="@+id/small_clock_warning"
|
|
android:orientation="vertical">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingLeft="24dp"
|
|
android:paddingRight="24dp"
|
|
android:paddingBottom="32dp"
|
|
android:duplicateParentState="true"
|
|
android:textSize="14sp"
|
|
android:text="@string/clock_warning"
|
|
android:textColor="@color/colorPrimaryText"
|
|
android:letterSpacing="0"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
|
app:textAllCaps="false" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</ScrollView>
|
|
</layout> |