修改测试问题
This commit is contained in:
@@ -3,7 +3,9 @@ package com.yunbao.main.activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
@@ -72,7 +74,26 @@ public class SearchActivity extends AbsActivity {
|
||||
mEditText.setText("");
|
||||
}
|
||||
});
|
||||
findViewById(R.id.btn_delete).setVisibility(View.GONE);
|
||||
mEditText.setOnEditorActionListener(onEditorActionListener);
|
||||
mEditText.addTextChangedListener(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) {
|
||||
if (!s.toString().trim().isEmpty()) {
|
||||
findViewById(R.id.btn_delete).setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
||||
}
|
||||
});
|
||||
//退出检索页面保存搜索记录
|
||||
findViewById(R.id.btn_back).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user