Handle bottom divider visibility
This commit is contained in:
parent
7e1de273f5
commit
c1dbd2c9e2
1 changed files with 5 additions and 1 deletions
|
@ -125,7 +125,7 @@ public class NotesAdapter extends ArrayAdapter<Object> {
|
||||||
holder.icon.setImageDrawable(app.getIconsCache().getIcon(iconRes, colorRes));
|
holder.icon.setImageDrawable(app.getIconsCache().getIcon(iconRes, colorRes));
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.bottomDivider.setVisibility(View.VISIBLE);
|
holder.bottomDivider.setVisibility(hideBottomDivider(position) ? View.GONE : View.VISIBLE);
|
||||||
holder.icon.setVisibility(selectionMode ? View.GONE : View.VISIBLE);
|
holder.icon.setVisibility(selectionMode ? View.GONE : View.VISIBLE);
|
||||||
holder.checkBox.setVisibility(selectionMode ? View.VISIBLE : View.GONE);
|
holder.checkBox.setVisibility(selectionMode ? View.VISIBLE : View.GONE);
|
||||||
holder.options.setVisibility(selectionMode ? View.GONE : View.VISIBLE);
|
holder.options.setVisibility(selectionMode ? View.GONE : View.VISIBLE);
|
||||||
|
@ -183,6 +183,10 @@ public class NotesAdapter extends ArrayAdapter<Object> {
|
||||||
return TYPE_COUNT;
|
return TYPE_COUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean hideBottomDivider(int pos) {
|
||||||
|
return pos == getCount() - 1 || !(getItem(pos + 1) instanceof Recording);
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isSelectAllChecked() {
|
private boolean isSelectAllChecked() {
|
||||||
for (int i = 0; i < getCount(); i++) {
|
for (int i = 0; i < getCount(); i++) {
|
||||||
Object item = getItem(i);
|
Object item = getItem(i);
|
||||||
|
|
Loading…
Reference in a new issue