Update hiding widget due date

pull/996/head
Alex Baker 5 years ago
parent 7daa03e3c3
commit e2cb1c74bc

@ -62,13 +62,12 @@ class ScrollableWidget : InjectingPreferenceFragment() {
setupSlider(R.string.p_widget_opacity, 100)
setupSlider(R.string.p_widget_font_size, 16)
setupCheckbox(R.string.p_widget_show_due_date)
val showDueDate = setupCheckbox(R.string.p_widget_show_due_date)
setupCheckbox(R.string.p_widget_due_date_underneath, false).dependency = showDueDate.key
setupCheckbox(R.string.p_widget_show_checkboxes)
setupCheckbox(R.string.p_widget_due_date_underneath, false)
setupCheckbox(R.string.p_widget_show_full_task_title, false)
val showDescription = setupCheckbox(R.string.p_widget_show_description, true)
val showFullDescription = setupCheckbox(R.string.p_widget_show_full_description, false)
showFullDescription.dependency = showDescription.key
setupCheckbox(R.string.p_widget_show_full_description, false).dependency = showDescription.key
setupList(R.string.p_widget_spacing)
val showHeader = setupCheckbox(R.string.p_widget_show_header)
val showSettings = setupCheckbox(R.string.p_widget_show_settings)

@ -157,6 +157,7 @@ class ScrollableViewsFactory implements RemoteViewsService.RemoteViewsFactory {
formatDueDate(row, task);
} else {
row.setViewVisibility(R.id.widget_due_bottom, View.GONE);
row.setViewVisibility(R.id.widget_due_end, View.GONE);
if (task.hasDueDate() && task.isOverdue()) {
textColorTitle = getColor(context, R.color.overdue);
}

@ -57,10 +57,6 @@
android:title="@string/row_spacing"
android:summary="%s" />
<SwitchPreferenceCompat
android:key="@string/p_widget_show_due_date"
android:title="@string/widget_show_due_date" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="@string/p_widget_show_description"
@ -80,6 +76,10 @@
android:key="@string/p_widget_show_full_task_title"
android:title="@string/EPr_fullTask_title" />
<SwitchPreferenceCompat
android:key="@string/p_widget_show_due_date"
android:title="@string/widget_show_due_date" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/p_widget_due_date_underneath"

Loading…
Cancel
Save