Replace empty space with footer

pull/996/head
Alex Baker 5 years ago
parent 075f6f02d9
commit cf22d6dae8

@ -80,7 +80,7 @@ class ScrollableWidget : InjectingPreferenceFragment() {
val showDescription = setupCheckbox(R.string.p_widget_show_description, true)
setupCheckbox(R.string.p_widget_show_full_description, false).dependency = showDescription.key
setupList(R.string.p_widget_spacing)
setupList(R.string.p_widget_empty_space_click)
setupList(R.string.p_widget_footer_click)
setupList(R.string.p_widget_due_date_position, widgetPreferences.dueDatePosition.toString())
val showHeader = setupCheckbox(R.string.p_widget_show_header)
val showSettings = setupCheckbox(R.string.p_widget_show_settings)

@ -110,7 +110,7 @@ public class TasksWidget extends InjectingAppWidgetProvider {
remoteViews.setOnClickPendingIntent(R.id.widget_change_list, getChooseListIntent(context, filter, id));
remoteViews.setOnClickPendingIntent(
R.id.widget_reconfigure, getWidgetConfigIntent(context, id));
if (widgetPreferences.openOnEmptySpaceClick()) {
if (widgetPreferences.openOnFooterClick()) {
remoteViews.setOnClickPendingIntent(R.id.empty_view, getOpenListIntent(context, filter, id));
} else {
remoteViews.setOnClickPendingIntent(R.id.empty_view, null);

@ -102,8 +102,8 @@ public class WidgetPreferences {
return getAlphaValue(R.string.p_widget_opacity);
}
boolean openOnEmptySpaceClick() {
return getIntegerFromString(R.string.p_widget_empty_space_click, 0) == 1;
boolean openOnFooterClick() {
return getIntegerFromString(R.string.p_widget_footer_click, 0) == 1;
}
private int getAlphaValue(int resId) {

@ -574,10 +574,10 @@
<string name="select_all">Alles auswählen</string>
<string name="share">Teilen</string>
<string name="hide_check_button">Abschließen-Schaltfläche ausblenden</string>
<string name="widget_empty_space_on_click">Beim Klicken</string>
<string name="widget_on_click">Beim Klicken</string>
<string name="widget_footer_settings">Fußzeilen-Einstellungen</string>
<string name="widget_show_dividers">Trenner anzeigen</string>
<string name="widget_empty_space_do_nothing">Nichts tun</string>
<string name="widget_do_nothing">Nichts tun</string>
<string name="opacity_footer">Transparenz Fußzeile</string>
<string name="opacity_row">Transparenz Zeile</string>
<string name="opacity_header">Transparenz Kopfzeile</string>
@ -588,6 +588,6 @@
<string name="widget_due_date_hidden">Ausgeblendet</string>
<string name="widget_due_date_after_title">Hinter dem Titel</string>
<string name="widget_due_date_below_title">Unter dem Titel</string>
<string name="widget_empty_space_open_list">Liste öffnen</string>
<string name="widget_open_list">Liste öffnen</string>
<string name="widget_show_menu">Menü anzeigen</string>
</resources>

@ -582,9 +582,9 @@
<string name="compact">Compacto</string>
<string name="settings_default">Predefinido</string>
<string name="widget_id">Widget ID: %d</string>
<string name="widget_empty_space_open_list">Lista abierta</string>
<string name="widget_empty_space_do_nothing">No hagas nada</string>
<string name="widget_empty_space_on_click">Al hacer clic</string>
<string name="widget_open_list">Lista abierta</string>
<string name="widget_do_nothing">No hagas nada</string>
<string name="widget_on_click">Al hacer clic</string>
<string name="widget_show_menu">Mostrar el menú</string>
<string name="widget_hide_background">Ocultar fondo</string>
<string name="widget_due_date_hidden">Oculto</string>

@ -578,10 +578,10 @@
<string name="settings_default">Par défaut</string>
<string name="widget_id">ID du widget: %d</string>
<string name="widget_show_menu">Afficher le menu</string>
<string name="widget_empty_space_open_list">Liste ouverte</string>
<string name="widget_empty_space_do_nothing">Ne rien faire</string>
<string name="widget_open_list">Liste ouverte</string>
<string name="widget_do_nothing">Ne rien faire</string>
<string name="widget_hide_background">Cacher fond</string>
<string name="widget_empty_space_on_click">Sur clic</string>
<string name="widget_on_click">Sur clic</string>
<string name="widget_due_date_hidden">Caché</string>
<string name="widget_due_date_below_title">Sous le titre</string>
<string name="widget_due_date_after_title">Après le titre</string>

@ -584,9 +584,9 @@
<string name="widget_due_date_hidden">Elrejtve</string>
<string name="widget_due_date_below_title">Cím alatt</string>
<string name="widget_due_date_after_title">Cím után</string>
<string name="widget_empty_space_open_list">Lista megnyitása</string>
<string name="widget_empty_space_do_nothing">Nincs művelet</string>
<string name="widget_empty_space_on_click">Kattintásra</string>
<string name="widget_open_list">Lista megnyitása</string>
<string name="widget_do_nothing">Nincs művelet</string>
<string name="widget_on_click">Kattintásra</string>
<string name="widget_footer_settings">Lábléc beállításai</string>
<string name="opacity_footer">Lábléc átlátszóság</string>
<string name="opacity_row">Sor átlátszóság</string>

@ -545,9 +545,9 @@
<string name="settings_default">Forvalg</string>
<string name="widget_id">Miniprograms-ID: %d</string>
<string name="color_wheel">Fargehjul</string>
<string name="widget_empty_space_open_list">Åpne liste</string>
<string name="widget_empty_space_do_nothing">Ikke gjør noe</string>
<string name="widget_empty_space_on_click">Ved klikk</string>
<string name="widget_open_list">Åpne liste</string>
<string name="widget_do_nothing">Ikke gjør noe</string>
<string name="widget_on_click">Ved klikk</string>
<string name="menu_discard_changes">Forkast endringer</string>
<string name="widget_show_menu">Vis meny</string>
</resources>

@ -578,9 +578,9 @@
<string name="settings_default">Standaardwaarde</string>
<string name="widget_id">Widget ID: %d</string>
<string name="widget_show_menu">Toon menu</string>
<string name="widget_empty_space_open_list">Open lijst</string>
<string name="widget_empty_space_do_nothing">Doe niets</string>
<string name="widget_empty_space_on_click">Als je klikt</string>
<string name="widget_open_list">Open lijst</string>
<string name="widget_do_nothing">Doe niets</string>
<string name="widget_on_click">Als je klikt</string>
<string name="widget_hide_background">Verberg achtergrond</string>
<string name="widget_due_date_hidden">Verborgen</string>
<string name="widget_due_date_below_title">Onder titel</string>

@ -574,8 +574,8 @@
<string name="settings_default">默认</string>
<string name="widget_id">部件ID: %d</string>
<string name="widget_show_menu">显示菜单</string>
<string name="widget_empty_space_open_list">打开列表</string>
<string name="widget_empty_space_do_nothing">什么也不做</string>
<string name="widget_empty_space_on_click">点击时</string>
<string name="widget_open_list">打开列表</string>
<string name="widget_do_nothing">什么也不做</string>
<string name="widget_on_click">点击时</string>
<string name="widget_hide_background">隐藏背景</string>
</resources>

@ -123,8 +123,8 @@
</string-array>
<string-array name="widget_empty_click_titles">
<item>@string/widget_empty_space_do_nothing</item>
<item>@string/widget_empty_space_open_list</item>
<item>@string/widget_do_nothing</item>
<item>@string/widget_open_list</item>
</string-array>
<string-array name="widget_empty_click_values">
@ -301,7 +301,7 @@
<string name="p_widget_show_menu">widget-show-menu-</string>
<string name="p_widget_header_opacity">widget-header-opacity-</string>
<string name="p_widget_footer_opacity">widget-empty-space-opacity-</string>
<string name="p_widget_empty_space_click">widget-empty-space-click-</string>
<string name="p_widget_footer_click">widget-empty-space-click-</string>
<string name="p_widget_due_date_position">widget-due-date-position-</string>
<string name="p_widget_spacing">widget-spacing-</string>
<string name="p_dashclock_filter">dashclock_filter</string>

@ -415,9 +415,9 @@ File %1$s contained %2$s.\n\n
<string name="widget_header_settings">Header settings</string>
<string name="widget_row_settings">Row settings</string>
<string name="widget_footer_settings">Footer settings</string>
<string name="widget_empty_space_on_click">On click</string>
<string name="widget_empty_space_do_nothing">Do nothing</string>
<string name="widget_empty_space_open_list">Open list</string>
<string name="widget_on_click">On click</string>
<string name="widget_do_nothing">Do nothing</string>
<string name="widget_open_list">Open list</string>
<string name="widget_due_date_after_title">After title</string>
<string name="widget_due_date_below_title">Below title</string>
<string name="widget_due_date_hidden">Hidden</string>

@ -128,10 +128,10 @@
<ListPreference
android:defaultValue="0"
android:key="@string/p_widget_empty_space_click"
android:key="@string/p_widget_footer_click"
android:entryValues="@array/widget_empty_click_values"
android:entries="@array/widget_empty_click_titles"
android:title="@string/widget_empty_space_on_click"
android:title="@string/widget_on_click"
android:summary="%s" />
</PreferenceCategory>

Loading…
Cancel
Save