mac
2024-05-29 748e302167a333b08fb5813b6f48806210e53091
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseSearchActivity.java
@@ -173,6 +173,16 @@
            @Override
            public void onClick(int position, String title) {
                viewBinding.powerStationSearchEt.setText(title);
                //搜索关键字
                currSearchText = viewBinding.powerStationSearchEt.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();
                loadNextPageHouseList(true, 1, true);
            }
        });
        //电站点击是事件
@@ -386,7 +396,7 @@
        Collections.reverse(searchHistoryTitleList);
        if (searchHistoryTitleList.size() > maxValue) {
            //历史记录不能超出10
            searchHistoryTitleList.remove(searchHistoryTitleList.get(maxValue + 1));
            searchHistoryTitleList.remove(searchHistoryTitleList.get(maxValue));
        }
    }