|
|
|
@ -199,24 +199,22 @@ class ScrollableViewsFactory implements RemoteViewsService.RemoteViewsFactory {
|
|
|
|
|
"setBackgroundResource",
|
|
|
|
|
theme == 0 ? R.drawable.widget_ripple_light : R.drawable.widget_ripple_dark);
|
|
|
|
|
}
|
|
|
|
|
int horizontalPadding = (int) context.getResources().getDimension(R.dimen.widget_padding);
|
|
|
|
|
int verticalPadding = widgetPreferences.getWidgetSpacing();
|
|
|
|
|
int textBottomPadding = bottomDueDate && task.hasDueDate() ? 0 : verticalPadding;
|
|
|
|
|
row.setViewPadding(R.id.widget_complete_box, horizontalPadding, verticalPadding, horizontalPadding, verticalPadding);
|
|
|
|
|
|
|
|
|
|
int hPad = (int) context.getResources().getDimension(R.dimen.widget_padding);
|
|
|
|
|
int vPad = widgetPreferences.getWidgetSpacing();
|
|
|
|
|
row.setViewPadding(R.id.widget_complete_box, hPad, vPad, hPad, vPad);
|
|
|
|
|
if (showCheckboxes) {
|
|
|
|
|
row.setViewVisibility(R.id.widget_complete_box, View.VISIBLE);
|
|
|
|
|
Intent completeIntent = new Intent(WidgetClickActivity.COMPLETE_TASK);
|
|
|
|
|
completeIntent.putExtra(WidgetClickActivity.EXTRA_TASK, task);
|
|
|
|
|
row.setOnClickFillInIntent(R.id.widget_complete_box, completeIntent);
|
|
|
|
|
row.setViewPadding(R.id.widget_text, 0, verticalPadding, horizontalPadding, showDescription ? 0 : textBottomPadding);
|
|
|
|
|
row.setViewPadding(R.id.widget_due_bottom, 0, 0, horizontalPadding, verticalPadding);
|
|
|
|
|
row.setViewPadding(R.id.widget_description, 0, 0, horizontalPadding, textBottomPadding);
|
|
|
|
|
row.setViewPadding(R.id.start_padding, 0, 0, 0, 0);
|
|
|
|
|
} else {
|
|
|
|
|
row.setViewVisibility(R.id.widget_complete_box, View.GONE);
|
|
|
|
|
row.setViewPadding(R.id.widget_text, horizontalPadding, verticalPadding, horizontalPadding, showDescription ? 0 : textBottomPadding);
|
|
|
|
|
row.setViewPadding(R.id.widget_due_bottom, horizontalPadding, 0, horizontalPadding, verticalPadding);
|
|
|
|
|
row.setViewPadding(R.id.widget_description, horizontalPadding, 0, horizontalPadding, textBottomPadding);
|
|
|
|
|
row.setViewPadding(R.id.start_padding, hPad, 0, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
row.setViewPadding(R.id.top_padding, 0, vPad, 0, 0);
|
|
|
|
|
row.setViewPadding(R.id.bottom_padding, 0, vPad, 0, 0);
|
|
|
|
|
|
|
|
|
|
if (widgetPreferences.showDividers()) {
|
|
|
|
|
int dividerColor =
|
|
|
|
|