mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-26 14:57:38 +03:00
Update documentation
This commit is contained in:
parent
e8b4a75778
commit
f823e48c7c
3 changed files with 4 additions and 5 deletions
|
@ -48,11 +48,11 @@ public class NotesListViewItemTouchHelper extends ItemTouchHelper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Disable swipe on sections
|
||||
* Disable swipe on sections and if grid view is enabled
|
||||
*
|
||||
* @param recyclerView RecyclerView
|
||||
* @param viewHolder RecyclerView.ViewHoler
|
||||
* @return 0 if section, otherwise super()
|
||||
* @return 0 if viewHolder is section or grid view is enabled, otherwise super()
|
||||
*/
|
||||
@Override
|
||||
public int getSwipeDirs(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public class NoteViewGridHolder extends NoteViewHolder {
|
|||
}
|
||||
|
||||
public void showSwipe(boolean left) {
|
||||
|
||||
throw new UnsupportedOperationException(NoteViewGridHolder.class.getSimpleName() + " does not support swiping");
|
||||
}
|
||||
|
||||
public void bind(@NonNull DBNote note, boolean showCategory, int mainColor, int textColor, @Nullable CharSequence searchQuery) {
|
||||
|
@ -38,6 +38,6 @@ public class NoteViewGridHolder extends NoteViewHolder {
|
|||
}
|
||||
|
||||
public View getNoteSwipeable() {
|
||||
return null;
|
||||
throw new UnsupportedOperationException(NoteViewGridHolder.class.getSimpleName() + " does not support swiping");
|
||||
}
|
||||
}
|
|
@ -18,7 +18,6 @@ public class NoteViewHolderWithoutExcerpt extends NoteViewHolder {
|
|||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
public void showSwipe(boolean left) {
|
||||
binding.noteFavoriteLeft.setVisibility(left ? View.VISIBLE : View.INVISIBLE);
|
||||
binding.noteDeleteRight.setVisibility(left ? View.INVISIBLE : View.VISIBLE);
|
||||
|
|
Loading…
Reference in a new issue