Fix some crashes
This commit is contained in:
4 files changed
+49
-21
No files matched your search
@@ -152,10 +152,20 @@ public class SearchBar extends MaterialCardView implements View.OnClickListener,
|
||||
mListView.addItemDecoration(decoration);
|
||||
mListView.setLayoutManager(layoutManager);
|
||||
mListView.setOnItemClickListener((parent, view, position, id) -> {
|
||||
mSuggestionList.get(position).onClick();
|
||||
return true;
|
||||
if (position < mSuggestionList.size() - 1) {
|
||||
mSuggestionList.get(position).onClick();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
mListView.setOnItemLongClickListener((parent, view, position, id) -> {
|
||||
if (position < mSuggestionList.size() - 1) {
|
||||
return mSuggestionList.get(position).onLongClick();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
mListView.setOnItemLongClickListener((parent, view, position, id) -> mSuggestionList.get(position).onLongClick());
|
||||
}
|
||||
|
||||
private void addListHeader() {
|
||||
|
||||
Reference in new issue
Block a user