mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-26 14:57:38 +03:00
Added some IDE hint annotations
This commit is contained in:
parent
0cfcb31f7d
commit
6da8a01b4d
5 changed files with 6 additions and 2 deletions
|
@ -139,7 +139,7 @@ public class ItemAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> i
|
|||
return !selected.contains(position) && selected.add(position);
|
||||
}
|
||||
|
||||
public void clearSelection(RecyclerView recyclerView) {
|
||||
public void clearSelection(@NonNull RecyclerView recyclerView) {
|
||||
for (Integer i : getSelected()) {
|
||||
RecyclerView.ViewHolder viewHolder = recyclerView.findViewHolderForAdapterPosition(i);
|
||||
if (viewHolder != null) {
|
||||
|
|
|
@ -37,7 +37,8 @@ public class NoteViewGridHolder extends NoteViewHolder {
|
|||
binding.noteExcerpt.setVisibility(TextUtils.isEmpty(note.getExcerpt()) ? GONE : VISIBLE);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public View getNoteSwipeable() {
|
||||
throw new UnsupportedOperationException(NoteViewGridHolder.class.getSimpleName() + " does not support swiping");
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -114,5 +114,6 @@ public abstract class NoteViewHolder extends RecyclerView.ViewHolder {
|
|||
|
||||
public abstract void showSwipe(boolean left);
|
||||
|
||||
@Nullable
|
||||
public abstract View getNoteSwipeable();
|
||||
}
|
|
@ -37,6 +37,7 @@ public class NoteViewHolderWithExcerpt extends NoteViewHolder {
|
|||
bindSearchableContent(context, binding.noteExcerpt, searchQuery, note.getExcerpt(), mainColor);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public View getNoteSwipeable() {
|
||||
return binding.noteSwipeable;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public class NoteViewHolderWithoutExcerpt extends NoteViewHolder {
|
|||
bindSearchableContent(context, binding.noteTitle, searchQuery, note.getTitle(), mainColor);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public View getNoteSwipeable() {
|
||||
return binding.noteSwipeable;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue