| | |
| | | @Override |
| | | public void onClick(int position, String title) { |
| | | viewBinding.messageSearchEt.setText(title); |
| | | //搜索关键字 |
| | | currSearchText = viewBinding.messageSearchEt.getText().toString().replace(" ", ""); |
| | | if (TextUtils.isEmpty(currSearchText)) { |
| | | HdlThreadLogic.toast(_mActivity, R.string.search_content_null); |
| | | return; |
| | | } |
| | | viewBinding.historyListParent.setVisibility(View.GONE); |
| | | viewBinding.listParent.setVisibility(View.VISIBLE); |
| | | addSearchTextToList(); |
| | | loadNextPageMessageList(true, 1, viewBinding.messageSearchEt.getText().toString(), true); |
| | | } |
| | | }); |
| | | //消息点击是事件 |
| | |
| | | @Override |
| | | public void onClick(int position, MessageBean messageBean) { |
| | | Intent intent = new Intent(); |
| | | intent.putExtra("messageBean",new Gson().toJson(messageBean)); |
| | | intent.putExtra("messageBean", new Gson().toJson(messageBean)); |
| | | intent.setClass(_mActivity, MessageInfoActivity.class); |
| | | startActivity(intent); |
| | | } |
| | |
| | | Collections.reverse(searchHistoryTitleList); |
| | | if (searchHistoryTitleList.size() > maxValue) { |
| | | //历史记录不能超出10 |
| | | searchHistoryTitleList.remove(searchHistoryTitleList.get(maxValue + 1)); |
| | | searchHistoryTitleList.remove(searchHistoryTitleList.get(maxValue)); |
| | | } |
| | | |
| | | } |