android Refresh후 ListView 위치 고정시키기

Android에서 Timer사용하여 1초마다 Refresh를 하도록 구현하였습니다.

그런데 1초마다 Refresh가 되면서 Listview가 맨 밑에 항목을 보고있다가도 Refresh가 되면 최상단으로 이동합니다....ㅠㅠ

Refresh는 되지만 listView의 위치는 변하지 않도록 하는 방법이 있을까요?

알려주시면 감사하겠습니다~!

혹시몰라 코드 첨부합니다!!

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        showPermissionDialog();
        mListView = (ListView) findViewById(R.id.listView);

        mWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
        if (!mWifiManager.isWifiEnabled()) {
            mWifiManager.setWifiEnabled(true);
        }
        mTimerTask = new TimerTask() {
            @Override
            public void run() {
                handler.post(new Runnable() {
                    public void run() {
                        WifiScanResult();
                        ConnectAP();
                        Log.d(TAG, "Timer");
                        mAdapter.notifyDataSetChanged();
                    }
                });
            }
        };
        mTimer = new Timer();
        mTimer.schedule(mTimerTask, 0, 1000);
//        mListView.setTranscriptMode(ListView.TRANSCRIPT_MODE_DISABLED);
    }

    public void WifiScanResult() {
        mScanDatas = mWifiManager.getScanResults();
        mFullList = new ArrayList<>();
        mAdapter = new WifiAdapter(getApplicationContext(), R.layout.item_layout, mFullList);
        if (mScanDatas.size() != 0) {
            mFullList.add(mScanDatas.get(0));
            mFullList.get(0).BSSID += ("\t\t" + mScanDatas.get(0).level);
            for (int i = 1; i < mScanDatas.size(); i++) {
                String str1 = mScanDatas.get(i).SSID;
                for (int j = 0; j < mFullList.size(); j++) {
                    String str2 = mFullList.get(j).SSID;
                    if (str1.equals(str2)) {
                        mFullList.get(j).BSSID += ("\n" + mScanDatas.get(i).BSSID + "\t\t" + mScanDatas.get(i).level);
                        break;
                    } else if (j == mFullList.size() - 1) {
                        mFullList.add(mScanDatas.get(i));
                        mFullList.get(j+1).BSSID += ("\t\t" + mScanDatas.get(j+1).level);
                        break;
                    }
                }
            }
        }
        for(int i = 0; i < mFullList.size() ; i++){
            if(mFullList.get(i).SSID.equals("")){
                mFullList.get(i).SSID = getString(R.string.HiddenSSID);
            }
        }
        mListView.setAdapter(mAdapter);
    }

    public void ConnectAP() {
        mTvWifiStatus = (TextView) findViewById(R.id.tvWifiStatus);
        mTvTest = (TextView) findViewById(R.id.tvTest);
        mConnectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);

        String str = "";

        NetworkInfo activeNetwork = mConnectivityManager.getActiveNetworkInfo();
        String strSSID;
        String strBSSID;
        Integer intRSSI;
        String strNetType;

        if (activeNetwork != null) {
            int m_iNetworkType = activeNetwork.getType();
            if (m_iNetworkType == mConnectivityManager.TYPE_WIFI) {
                //Wi_Fi 연결 시 AP의 SSID, BSSID, RSSI를 가져온다.
                strSSID = mWifiManager.getConnectionInfo().getSSID().replaceAll("\"", "");
                strBSSID = mWifiManager.getConnectionInfo().getBSSID();
                intRSSI = mWifiManager.getConnectionInfo().getRssi();

                mTvWifiStatus.setText(strSSID + "\n" + strBSSID + "\t\t" + intRSSI);

                for (int i = 0; i < mFullList.size(); i++) {
                    String scanSSID = mFullList.get(i).SSID;
                    String scanBSSID = mFullList.get(i).BSSID;

                    if (scanSSID.equals(strSSID)) {
                        if (!(scanBSSID.equals(strBSSID))) {
                            str += (mFullList.get(i).BSSID + "\t\t");
                            Log.d(TAG, " " + mFullList.get(i).BSSID);
                            Log.d(TAG, " " + mFullList.get(i).level);
                        }
                    }
                }
                mTvTest.setText(str);
            }
        }
        if (activeNetwork == null) {
            strNetType = getString(R.string.disconnected);
            mTvWifiStatus.setText(strNetType);
        }
    }

ᕕ( ᐛ )ᕗ
로그인이 필요합니다

작성한 답변에 다른 개발자들이 댓글을 작성하거나 댓글에 좋아요/싫어요를 할 수 있기 때문에 계정을 필요로 합니다.