From 923e59c7e538300d822eb7bf6d43a5465fb1743c Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 19 十一月 2025 14:31:55 +0800
Subject: [PATCH] 2025-11-19 14:31:50

---
 app/src/main/java/com/hdl/photovoltaic/ui/message/MessageActivity.java            |    3 
 app/src/main/res/layout/fragement_message_house.xml                               |   30 --
 app/src/main/AndroidManifest.xml                                                  |    3 
 app/src/main/java/com/hdl/photovoltaic/ui/message/MessageHouseFragment.java       |   57 -----
 app/src/main/java/com/hdl/photovoltaic/ui/message/SearchMessageHouseActivity.java |  435 +++++++++++++++++++++++++++++++++++++++++++
 app/src/main/res/layout/activity_search_message_house.xml                         |   10 +
 app/src/main/res/layout/activity_house_search.xml                                 |   28 +
 7 files changed, 482 insertions(+), 84 deletions(-)

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index aaecda6..fb74d4b 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -69,6 +69,9 @@
         android:supportsRtl="true"
         android:theme="@style/Theme.PhotovoltaicDebug">
         <activity
+            android:name=".ui.message.SearchMessageHouseActivity"
+            android:exported="false" />
+        <activity
             android:name=".ui.message.MessageActivity"
             android:exported="false" />
         <activity
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/message/MessageActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/message/MessageActivity.java
index 3eaf048..78f5fff 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/message/MessageActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/message/MessageActivity.java
@@ -39,6 +39,9 @@
 import java.util.List;
 import java.util.Map;
 
+/**
+ * 鐢电珯娑堟伅鐣岄潰
+ */
 public class MessageActivity extends CustomBaseActivity {
 
     private FragmentMessageBinding viewBinding;
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/message/MessageHouseFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/message/MessageHouseFragment.java
index f661011..a280182 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/message/MessageHouseFragment.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/message/MessageHouseFragment.java
@@ -30,6 +30,7 @@
 import com.hdl.photovoltaic.ui.adapter.MessageHouseAdapter;
 import com.hdl.photovoltaic.ui.bean.MessageBean;
 import com.hdl.photovoltaic.ui.bean.UnCountBean;
+import com.hdl.photovoltaic.ui.powerstation.HouseSearchActivity;
 import com.hdl.photovoltaic.utils.KeyboardStateObserverUtils;
 import com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout;
 import com.hdl.photovoltaic.widget.refreshlayout.HDLRefreshViewHolder;
@@ -179,15 +180,12 @@
 
     private void initEvent() {
         //鎼滅储
-        viewBinding.powerStationSearchEt.addTextChangedListener(powerStationSearchWatcher);
-        //娓呴櫎鎼滅储鏂囨
-        viewBinding.powerStationClearIv.setOnClickListener(new View.OnClickListener() {
+        viewBinding.powerStationSearchCl.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                viewBinding.powerStationSearchEt.setText("");
-                viewBinding.powerStationClearIv.setVisibility(View.GONE);
-                getMessageHouseList("", false);
-
+                Intent intent = new Intent();
+                intent.setClass(_mActivity, SearchMessageHouseActivity.class);
+                startActivity(intent);
             }
         });
         //鍏ㄩ儴宸茶
@@ -263,22 +261,7 @@
         viewBinding.houseListRcv.setLayoutManager(new LinearLayoutManager(_mActivity));
         viewBinding.houseListRcv.setAdapter(mMessageHouseAdapter);
         this.pullToRefresh();
-        //鍦ㄧ晫闈腑浣跨敤
-        KeyboardStateObserverUtils.getKeyboardStateObserver(_mActivity).setKeyboardVisibilityListener(new KeyboardStateObserverUtils.OnKeyboardVisibilityListener() {
-            @Override
-            public void onKeyboardShow(int h) {
-                //Toast.makeText(MainActivity.this,"閿洏寮瑰嚭",Toast.LENGTH_SHORT).show();
-//                viewBinding.messageSearchEt.requestFocus();
 
-            }
-
-            @Override
-
-            public void onKeyboardHide(int h) {
-                viewBinding.powerStationSearchEt.clearFocus();
-            }
-
-        });
     }
 
     /**
@@ -372,38 +355,8 @@
         }
     }
 
-    /**
-     *
-     */
-    private final TextWatcher powerStationSearchWatcher = new TextWatcher() {
-        @Override
-        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-
-        }
-
-        @Override
-        public void onTextChanged(CharSequence s, int start, int before, int count) {
-            //鎼滅储鍏抽敭瀛�
-            String currSearchText = s.toString().replace(" ", "");
-            if (TextUtils.isEmpty(currSearchText)) {
-                viewBinding.powerStationClearIv.setVisibility(View.GONE);
-//                HdlThreadLogic.toast(_mActivity, R.string.search_content_null);
-                return;
-            }
-            viewBinding.powerStationClearIv.setVisibility(View.VISIBLE);
-            viewBinding.powerStationSearchEt.clearFocus();
-            getMessageHouseList(currSearchText, false);
-        }
-
-        @Override
-        public void afterTextChanged(Editable s) {
-
-        }
-    };
-
     @Override
     public void onDestroy() {
         super.onDestroy();
-        viewBinding.powerStationSearchEt.removeTextChangedListener(powerStationSearchWatcher);
     }
 }
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/message/SearchMessageHouseActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/message/SearchMessageHouseActivity.java
new file mode 100644
index 0000000..9799503
--- /dev/null
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/message/SearchMessageHouseActivity.java
@@ -0,0 +1,435 @@
+package com.hdl.photovoltaic.ui.message;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Looper;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.view.View;
+import android.view.inputmethod.InputMethodManager;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import com.hdl.linkpm.sdk.core.exception.HDLException;
+import com.hdl.photovoltaic.R;
+import com.hdl.photovoltaic.base.CustomBaseActivity;
+import com.hdl.photovoltaic.config.ConstantManage;
+import com.hdl.photovoltaic.databinding.ActivityHouseSearchBinding;
+import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch;
+import com.hdl.photovoltaic.listener.CloudCallBeak;
+import com.hdl.photovoltaic.other.HdlCommonLogic;
+import com.hdl.photovoltaic.other.HdlFileLogic;
+import com.hdl.photovoltaic.other.HdlLogLogic;
+import com.hdl.photovoltaic.other.HdlMessageLogic;
+import com.hdl.photovoltaic.other.HdlThreadLogic;
+import com.hdl.photovoltaic.ui.adapter.MessageHouseAdapter;
+import com.hdl.photovoltaic.ui.adapter.SearchHistoryAdapter;
+import com.hdl.photovoltaic.ui.bean.MessageBean;
+import com.hdl.photovoltaic.utils.KeyboardStateObserverUtils;
+import com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout;
+import com.hdl.photovoltaic.widget.refreshlayout.HDLRefreshViewHolder;
+import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
+
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+import org.greenrobot.eventbus.ThreadMode;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 鎼滅储鐢电珯娑堟伅
+ */
+public class SearchMessageHouseActivity extends CustomBaseActivity {
+    private ActivityHouseSearchBinding viewBinding;
+    private Handler handler;
+    private Runnable delayedRunnable;
+    SearchHistoryAdapter searchHistoryAdapter;
+    MessageHouseAdapter searchMessageHouseAdapter;
+
+    List<MessageBean> mList = new ArrayList<>();
+    List<String> searchHistoryTitleList = new ArrayList<>();
+    private String currSearchText;
+
+    @Override
+    public Object getContentView() {
+        viewBinding = ActivityHouseSearchBinding.inflate(getLayoutInflater());
+        return viewBinding.getRoot();
+    }
+
+    @Override
+    public void onBindView(Bundle savedInstanceState) {
+        setStatusBarTranslucent();
+        getWindow().setNavigationBarColor(getColor(R.color.text_FF000000));
+        //鍘嗗彶璁板綍鏂囦欢澶瑰垱寤�
+        HdlFileLogic.getInstance().createFileDir(HdlFileLogic.getInstance().getCurrentUserRootPath());
+        //鍒濆鍖栨暟鎹�
+        initData();
+        //鍒濆鍖�
+        initView();
+        //鍒濆鍖栫晫闈㈢洃鍚櫒
+        initEvent();
+    }
+
+
+    private void initData() {
+        try {
+            String json = HdlFileLogic.getInstance().readFile(getHistoryFileNamePath());
+            if (TextUtils.isEmpty(json)) {
+                return;
+            }
+            searchHistoryTitleList = new Gson().fromJson(json, new TypeToken<List<String>>() {
+            }.getType());
+        } catch (Exception ignored) {
+        }
+    }
+
+    /**
+     * 涓嬫媺鍒锋柊鐨勯�昏緫
+     */
+    protected void pullToRefresh() {
+        viewBinding.listSrl.setDelegate(new BGARefreshLayout.BGARefreshLayoutDelegate() {
+            @Override
+            public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
+                handler = new Handler(Looper.getMainLooper());
+
+                delayedRunnable = new Runnable() {
+                    @Override
+                    public void run() {
+                        viewBinding.listSrl.endRefreshing();
+                        getMessageHouseList(currSearchText, false);
+                    }
+                };
+                // 寤惰繜 5 绉掓墽琛�
+                handler.postDelayed(delayedRunnable, 1000);
+            }
+
+
+            @Override
+            public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
+
+//                handler = new Handler(Looper.getMainLooper());
+//                delayedRunnable = new Runnable() {
+//                    @Override
+//                    public void run() {
+//                        viewBinding.listSrl.endLoadingMore();
+//                        //鍔犺浇鏈�鏂版暟鎹畬鎴�
+//                        if (!isHouseLoadingMore) {
+//                            // 婊戝姩鍒颁簡搴曢儴锛屾墽琛岀浉搴旂殑鎿嶄綔
+//                            getMessageHouseList(currSearchText,false);
+//                        }
+//                    }
+//                };
+//                // 寤惰繜 5 绉掓墽琛�
+//                handler.postDelayed(delayedRunnable, 10);
+
+                return true;
+            }
+        });
+        HDLRefreshViewHolder hdlRefreshViewHolder = new HDLRefreshViewHolder(_mActivity, true);
+        hdlRefreshViewHolder.setPullDownImageResource(R.mipmap.loading_44);
+        hdlRefreshViewHolder.setChangeToReleaseRefreshAnimResId(R.drawable.loading_refresh);
+        hdlRefreshViewHolder.setRefreshingAnimResId(R.drawable.loading_refresh_end);
+        viewBinding.listSrl.setRefreshViewHolder(hdlRefreshViewHolder);
+    }
+
+
+    private void initEvent() {
+
+        //鍚庨��
+        viewBinding.backRl.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                finish();
+            }
+        });
+        viewBinding.powerStationSearchEt.addTextChangedListener(textWatcher);
+        //鎼滅储
+        viewBinding.powerStationSearchTv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                //鎼滅储鍏抽敭瀛�
+                currSearchText = viewBinding.powerStationSearchEt.getText().toString().replace(" ", "");
+                viewBinding.historyListParent.setVisibility(View.GONE);
+                viewBinding.listParent.setVisibility(View.VISIBLE);
+                viewBinding.powerStationSearchEt.clearFocus();
+                hideSoftInputFromWindow();
+                addSearchTextToList();
+                getMessageHouseList(currSearchText, true);
+            }
+        });
+        //娓呴櫎
+        viewBinding.powerStationClearIv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                currSearchText = "";
+                viewBinding.powerStationSearchEt.setText("");
+                viewBinding.historyListParent.setVisibility(View.VISIBLE);
+                viewBinding.listParent.setVisibility(View.GONE);
+                viewBinding.deviceNullDataIc.getRoot().setVisibility(View.GONE);
+                searchHistoryAdapter.setList(searchHistoryTitleList);
+                viewBinding.powerStationSearchEt.requestFocus();
+                showSoftInput();
+                mList.clear();
+                searchMessageHouseAdapter.setList(mList);
+            }
+        });
+        //鍒犻櫎
+        viewBinding.powerStationDelIv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                viewBinding.powerStationSearchEt.clearFocus();
+                hideSoftInputFromWindow();
+                searchHistoryTitleList = new ArrayList<>();
+                searchHistoryAdapter.setList(searchHistoryTitleList);
+                viewBinding.deviceNullDataIc.getRoot().setVisibility(View.GONE);
+                HdlFileLogic.getInstance().deleteFile(getHistoryFileNamePath());
+
+            }
+        });
+        //鍘嗗彶璁板綍鐐瑰嚮浜嬩欢
+        searchHistoryAdapter.setOnclickListener(new SearchHistoryAdapter.OnClickListener() {
+            @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.powerStationSearchEt.clearFocus();
+                hideSoftInputFromWindow();
+                viewBinding.historyListParent.setVisibility(View.GONE);
+                viewBinding.listParent.setVisibility(View.VISIBLE);
+                addSearchTextToList();
+                getMessageHouseList(currSearchText, true);
+
+            }
+        });
+        //鐢电珯鐐瑰嚮鏄簨浠�
+        if (searchMessageHouseAdapter != null) {
+            searchMessageHouseAdapter.setOnclickListener(new MessageHouseAdapter.OnClickListener() {
+                @Override
+                public void onClick(int position, MessageBean messageBean) {
+                    Intent intent = new Intent();
+                    intent.putExtra("messageBean", new Gson().toJson(messageBean));
+                    intent.setClass(_mActivity, MessageActivity.class);
+                    startActivity(intent);
+                }
+            });
+
+        }
+
+    }
+
+    /**
+     * 鏄剧ず杞敭鐩�
+     */
+    public void showSoftInput() {
+        InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+        inputMethodManager.showSoftInput(viewBinding.powerStationSearchEt, 0);
+
+    }
+
+    /**
+     * 闅愯棌杞敭鐩�
+     */
+    public void hideSoftInputFromWindow() {
+        InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+        inputMethodManager.hideSoftInputFromWindow(viewBinding.getRoot().getWindowToken(), 0);
+    }
+
+    private void initView() {
+        viewBinding.historyListParent.setVisibility(View.VISIBLE);
+        viewBinding.listParent.setVisibility(View.GONE);
+        viewBinding.powerStationClearIv.setVisibility(View.GONE);
+        //鍒濆鍖栧巻鍙茶褰曢�傞厤鍣�
+        searchHistoryAdapter = new SearchHistoryAdapter(_mActivity);
+        viewBinding.historyListRcv.setLayoutManager(new LinearLayoutManager(_mActivity));
+        viewBinding.historyListRcv.setAdapter(searchHistoryAdapter);
+        searchHistoryAdapter.setList(searchHistoryTitleList);
+        //鍒濆鍖栫數绔欓�傞厤鍣�
+        searchMessageHouseAdapter = new MessageHouseAdapter(_mActivity);
+        viewBinding.listRcv.setLayoutManager(new LinearLayoutManager(_mActivity));
+        viewBinding.listRcv.setAdapter(searchMessageHouseAdapter);
+        viewBinding.powerStationSearchEt.post(new Runnable() {
+            @Override
+            public void run() {
+                viewBinding.powerStationSearchEt.requestFocus();
+            }
+        });
+
+        pullToRefresh();
+
+        //鍦ㄧ晫闈腑浣跨敤
+        KeyboardStateObserverUtils.getKeyboardStateObserver(_mActivity).setKeyboardVisibilityListener(new KeyboardStateObserverUtils.OnKeyboardVisibilityListener() {
+            @Override
+            public void onKeyboardShow(int h) {
+                //Toast.makeText(MainActivity.this,"閿洏寮瑰嚭",Toast.LENGTH_SHORT).show();
+//                viewBinding.powerStationSearchEt.requestFocus();
+
+            }
+
+            @Override
+
+            public void onKeyboardHide(int h) {
+                viewBinding.powerStationSearchEt.clearFocus();
+            }
+
+        });
+
+
+    }
+
+
+    /**
+     * 杈撳叆鐢电珯鍚嶇О杩涜杩囨护
+     */
+    private final TextWatcher textWatcher = new TextWatcher() {
+        @Override
+        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+        }
+
+        @Override
+        public void onTextChanged(CharSequence s, int start, int before, int count) {
+        }
+
+        @Override
+        public void afterTextChanged(Editable s) {
+            String et = viewBinding.powerStationSearchEt.getText().toString().replace(" ", "");
+            if (TextUtils.isEmpty(et)) {
+                viewBinding.powerStationClearIv.setVisibility(View.GONE);
+            } else {
+                viewBinding.powerStationClearIv.setVisibility(View.VISIBLE);
+            }
+            viewBinding.powerStationSearchEt.setSelection(viewBinding.powerStationSearchEt.length());
+
+        }
+    };
+
+    /**
+     * 閲嶆柊鏇存柊鍒楄〃鏁版嵁
+     */
+    private void updateRecyclerViewList() {
+        if (searchMessageHouseAdapter == null) {
+            return;
+        }
+        searchMessageHouseAdapter.setList(mList);
+        nullDataUpdateUi();
+    }
+
+    /**
+     * 鐗╃悊鎸夐敭杩斿洖浜嬩欢
+     */
+    @Override
+    public void onBackPressed() {
+        super.onBackPressed();
+    }
+
+    @Override
+    protected void onDestroy() {
+        viewBinding.powerStationSearchEt.removeTextChangedListener(textWatcher);
+        if (searchHistoryTitleList.size() > 0) {
+            HdlFileLogic.getInstance().deleteFile(getHistoryFileNamePath());
+            HdlFileLogic.getInstance().appendFile(getHistoryFileNamePath(), new Gson().toJson(searchHistoryTitleList));
+        }
+        if (handler != null && delayedRunnable != null) {
+            handler.removeCallbacks(delayedRunnable);
+        }
+        super.onDestroy();
+    }
+
+
+    /**
+     * 娣诲姞鍘嗗彶璁板綍
+     */
+    private void addSearchTextToList() {
+        if (TextUtils.isEmpty(currSearchText.replace(" ", ""))) {
+            return;
+        }
+        for (int i = 0; i < searchHistoryTitleList.size(); i++) {
+            if (searchHistoryTitleList.get(i).equals(currSearchText)) {
+                searchHistoryTitleList.remove(searchHistoryTitleList.get(i));
+            }
+        }
+        final int maxValue = 10;
+        searchHistoryTitleList.add(0, currSearchText);
+        if (searchHistoryTitleList.size() > maxValue) {
+            //鍘嗗彶璁板綍涓嶈兘瓒呭嚭10
+            searchHistoryTitleList.remove(searchHistoryTitleList.get(maxValue));
+        }
+
+    }
+
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    public void onEventMessage(BaseEventBus eventBus) {
+        super.onEventMessage(eventBus);
+        if (eventBus == null) {
+            return;
+        }
+        //鎺ユ敹澶栭儴鐐瑰嚮浜嬩欢
+        if (eventBus.getTopic().equals(ConstantManage.refresh_message_house)) {
+            EventBus.getDefault().removeStickyEvent(eventBus);
+            getMessageHouseList(currSearchText, false);
+        }
+
+    }
+
+    /**
+     * 鑾峰彇璐﹀彿涓嬪叏閮ㄧ數绔欐秷鎭�
+     *
+     * @param homeName      鐢电珯鍚嶇О锛堟悳绱㈢敤鐨勶級,濡傛灉鏄┖瀛楃涓查粯璁よ鍙栧叏閮�
+     * @param isShowLoading 鏄惁闇�瑕佸姞杞界獥锛坱rue=闇�瑕侊紝false=涓嶉渶瑕侊級
+     */
+    private void getMessageHouseList(String homeName, boolean isShowLoading) {
+        if (isShowLoading) {
+            showLoading();
+        }
+        HdlMessageLogic.getInstance().getMessageHouseList(homeName, new CloudCallBeak<List<MessageBean>>() {
+            @Override
+            public void onSuccess(List<MessageBean> list) {
+                if (isShowLoading) {
+                    hideLoading();
+                }
+                mList.clear();
+                if (list != null && !list.isEmpty()) {
+                    mList.addAll(list);
+                }
+                updateRecyclerViewList();
+
+            }
+
+            @Override
+            public void onFailure(HDLException e) {
+
+                if (isShowLoading) {
+                    hideLoading();
+                }
+            }
+        });
+    }
+
+    /**
+     * 娌℃湁鐢电珯鍒楄〃鐨勬牱寮�
+     */
+    private void nullDataUpdateUi() {
+        boolean is_data = mList != null && mList.size() > 0;
+        HdlCommonLogic.getInstance().nullDataUpdateUi(_mActivity, viewBinding.deviceNullDataIc.getRoot(), viewBinding.deviceNullDataIc.nullDataGifAnimationIv, viewBinding.deviceNullDataIc.nullDataTv, getString(R.string.my_power_station_data_null), is_data);
+    }
+
+    /**
+     * 鑾峰彇銆愭悳绱㈠巻鍙茶褰曟枃浠躲�戝叏璺緞
+     */
+    public String getHistoryFileNamePath() {
+        return HdlFileLogic.getInstance().getCurrentUserRootPath() + "/message_house_history.txt";
+    }
+
+
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_house_search.xml b/app/src/main/res/layout/activity_house_search.xml
index 0821772..9175ddc 100644
--- a/app/src/main/res/layout/activity_house_search.xml
+++ b/app/src/main/res/layout/activity_house_search.xml
@@ -33,10 +33,11 @@
 
 
         <RelativeLayout
+            android:id="@+id/search_et_bj"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_marginStart="@dimen/dp_7"
-            android:layout_marginEnd="@dimen/dp_21"
+            android:layout_marginEnd="@dimen/dp_11"
             android:layout_toStartOf="@+id/power_station_search_tv"
             android:layout_toEndOf="@+id/back_rl"
             android:background="@drawable/search_bj_ff1c1c1e">
@@ -76,17 +77,23 @@
                 android:src="@drawable/clear" />
         </RelativeLayout>
 
-        <TextView
+        <LinearLayout
             android:id="@+id/power_station_search_tv"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:layout_alignParentEnd="true"
-            android:layout_centerVertical="true"
-            android:layout_marginEnd="@dimen/dp_21"
-            android:gravity="center"
-            android:text="@string/search"
-            android:textColor="@color/text_FFACACAC"
-            android:textSize="@dimen/text_14" />
+            android:layout_centerVertical="true">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/dp_10"
+                android:layout_marginEnd="@dimen/dp_21"
+                android:gravity="center"
+                android:text="@string/search"
+                android:textColor="@color/text_FFACACAC"
+                android:textSize="@dimen/text_14" />
+        </LinearLayout>
 
 
     </RelativeLayout>
@@ -158,7 +165,10 @@
             <androidx.recyclerview.widget.RecyclerView
                 android:id="@+id/list_rcv"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent" />
+                android:layout_height="match_parent"
+                android:clipToPadding="false"
+                android:paddingTop="@dimen/dp_10"
+                />
         </com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout>
 
     </androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/app/src/main/res/layout/activity_search_message_house.xml b/app/src/main/res/layout/activity_search_message_house.xml
new file mode 100644
index 0000000..401f956
--- /dev/null
+++ b/app/src/main/res/layout/activity_search_message_house.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/main"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".ui.message.SearchMessageHouseActivity">
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragement_message_house.xml b/app/src/main/res/layout/fragement_message_house.xml
index 4aaca0a..c250d30 100644
--- a/app/src/main/res/layout/fragement_message_house.xml
+++ b/app/src/main/res/layout/fragement_message_house.xml
@@ -33,31 +33,16 @@
                 android:layout_marginStart="@dimen/dp_13"
                 android:src="@drawable/search_path" />
 
-            <EditText
-                android:id="@+id/power_station_search_et"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_alignParentEnd="true"
+            <TextView
+                android:id="@+id/power_station_search_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
                 android:layout_marginStart="@dimen/dp_11"
-                android:layout_marginEnd="@dimen/dp_40"
                 android:layout_toEndOf="@+id/power_station_search_iv"
-                android:background="@null"
-                android:gravity="start|center_vertical"
-                android:hint="@string/search_station"
-                android:textColor="@color/text_FFACACAC"
-                android:textColorHint="@color/text_FF5B5B5B"
+                android:text="@string/search_station"
+                android:textColor="@color/text_FF5B5B5B"
                 android:textSize="@dimen/text_14" />
-
-            <ImageView
-                android:id="@+id/power_station_clear_iv"
-                android:layout_width="@dimen/dp_20"
-                android:layout_height="@dimen/dp_20"
-                android:layout_alignParentEnd="true"
-                android:layout_centerVertical="true"
-                android:layout_marginEnd="@dimen/dp_13"
-                android:src="@drawable/clear"
-                android:visibility="gone" />
         </RelativeLayout>
 
         <ImageView
@@ -88,8 +73,7 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:clipToPadding="false"
-            android:paddingTop="@dimen/dp_10"
-            />
+            android:paddingTop="@dimen/dp_10" />
 
     </com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout>
     <!--娌℃湁鏁版嵁鏄剧ず鏍峰紡-->

--
Gitblit v1.8.0