Java 我想用“编辑文本”或“底部导航”视图而不是“搜索”菜单Android studio搜索我的回收视图。帮助我
我想使用编辑文本过滤我的回收视图,而不是使用搜索菜单搜索firebase,因为我希望它位于Android Studio应用程序的底部。对于搜索菜单,我们使用onCreate选项菜单和onQuery文本提交。编辑文本使用什么?您应该使用addTextChangedListener(new TextWatcher())按编辑文本进行搜索Java 我想用“编辑文本”或“底部导航”视图而不是“搜索”菜单Android studio搜索我的回收视图。帮助我,java,xml,android-studio,firebase-realtime-database,android-recyclerview,Java,Xml,Android Studio,Firebase Realtime Database,Android Recyclerview,我想使用编辑文本过滤我的回收视图,而不是使用搜索菜单搜索firebase,因为我希望它位于Android Studio应用程序的底部。对于搜索菜单,我们使用onCreate选项菜单和onQuery文本提交。编辑文本使用什么?您应该使用addTextChangedListener(new TextWatcher())按编辑文本进行搜索 EditText enter_gmail; enter_gmail = findViewById(R.id.enter_gmail); enter_g
EditText enter_gmail;
enter_gmail = findViewById(R.id.enter_gmail);
enter_gmail.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) {
}
@Override
public void afterTextChanged(Editable newText) {
// pass "newText" to recyclerview filter
// same as a onQueryTextChange()
}
});