|
|
@@ -29,17 +29,25 @@ public class SearchResultTagAdapter extends RecyclerView.Adapter<SearchResultTag
|
|
|
|
|
|
protected List<TagCheckBean> tagCheckBeans;
|
|
|
protected IEventListener listener;
|
|
|
+ protected boolean isInteraction;
|
|
|
|
|
|
- public SearchResultTagAdapter(List<TagCheckBean> tagBeans, IEventListener listener) {
|
|
|
+ public SearchResultTagAdapter(List<TagCheckBean> tagBeans, boolean isInteraction, IEventListener listener) {
|
|
|
this.tagCheckBeans = tagBeans;
|
|
|
+ this.isInteraction = isInteraction;
|
|
|
this.listener = listener;
|
|
|
}
|
|
|
|
|
|
@NonNull
|
|
|
@Override
|
|
|
public SearchResultTagHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
|
- View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.search_square_check_box, parent, false);
|
|
|
- return new SearchResultTagHolder(view);
|
|
|
+ if(isInteraction) {
|
|
|
+ View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.search_square_check_box, parent, false);
|
|
|
+ return new SearchResultTagHolder(view);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.search_nothing_check_box, parent, false);
|
|
|
+ return new SearchResultTagNothingHolder(view);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|