| | |
| | | |
| | | @Override |
| | | public void onBindViewHolder(@NonNull SearchHistoryAdapter.MyViewHolder holder, int position) { |
| | | |
| | | String history_title = this.mList.get(position); |
| | | |
| | | holder.history_title_tv.setText(history_title); |
| | | holder.itemView.setTag(position); |
| | | if (position == 0) { |
| | | holder.line_top.setVisibility(View.VISIBLE); |
| | | } |
| | | holder.itemView.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | |
| | | |
| | | |
| | | public TextView history_title_tv; |
| | | public View line_top; |
| | | |
| | | |
| | | public MyViewHolder(@NonNull View itemView) { |
| | | super(itemView); |
| | | history_title_tv = itemView.findViewById(R.id.history_title_tv); |
| | | line_top = itemView.findViewById(R.id.line_top); |
| | | } |
| | | } |
| | | } |