Flip expand/collapse indicators

pull/1100/head
Alex Baker 4 years ago
parent c396592575
commit bb5f3bc23a

@ -58,7 +58,7 @@ internal class SubheaderViewHolder(
DrawableUtil.setRightDrawable(
itemView.context,
text,
if (subheader.isCollapsed) R.drawable.ic_keyboard_arrow_up_black_18dp else R.drawable.ic_keyboard_arrow_down_black_18dp)
if (subheader.isCollapsed) R.drawable.ic_keyboard_arrow_down_black_18dp else R.drawable.ic_keyboard_arrow_up_black_18dp)
}
init {

@ -31,7 +31,7 @@ class HeaderViewHolder(
} else {
this.header.visibility = View.VISIBLE
this.header.text = header
this.header.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, if (section.collapsed) R.drawable.ic_keyboard_arrow_up_black_18dp else R.drawable.ic_keyboard_arrow_down_black_18dp, 0)
this.header.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, if (section.collapsed) R.drawable.ic_keyboard_arrow_down_black_18dp else R.drawable.ic_keyboard_arrow_up_black_18dp, 0)
this.header.setTextColor(
context.getColor(
if (sortMode == SortHelper.SORT_DUE && sortGroup > 0 && newDateTime(sortGroup).plusDays(1).startOfDay().isBeforeNow) R.color.overdue else R.color.text_secondary))

@ -50,7 +50,7 @@ class ChipProvider @Inject constructor(
val chip = newChip(task)
apply(
chip,
if (task.isCollapsed) R.drawable.ic_keyboard_arrow_up_black_24dp else R.drawable.ic_keyboard_arrow_down_black_24dp,
if (task.isCollapsed) R.drawable.ic_keyboard_arrow_down_black_24dp else R.drawable.ic_keyboard_arrow_up_black_24dp,
if (compact) locale.formatNumber(task.children) else activity
.resources
.getQuantityString(R.plurals.subtask_count, task.children, task.children),

@ -181,7 +181,7 @@ internal class ScrollableViewsFactory(
R.plurals.subtask_count, taskContainer.children, taskContainer.children))
row.setImageViewResource(
R.id.subtask_icon,
if (taskContainer.isCollapsed) R.drawable.ic_keyboard_arrow_up_black_18dp else R.drawable.ic_keyboard_arrow_down_black_18dp)
if (taskContainer.isCollapsed) R.drawable.ic_keyboard_arrow_down_black_18dp else R.drawable.ic_keyboard_arrow_up_black_18dp)
row.setViewVisibility(R.id.subtask_button, View.VISIBLE)
} else {
row.setViewVisibility(R.id.subtask_button, View.GONE)

Loading…
Cancel
Save