android TextWatcher

    private class SearchFieldWatcher implements TextWatcher {
        @Override
        public void afterTextChanged(Editable s) {
        }

        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        }

        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            mSearchButton.setEnabled(s.length() > 0);
        }
    }

posted @ 2012-04-27 10:41  Qiengo  阅读(282)  评论(0编辑  收藏  举报