After entering the content on editview, you can directly click the search key on the keyboard [adapted from the previous enter key]
The procedure is as follows:
1. Modify the editview attribute: Android: imeoptions = "actionsearch". When this editview gets the focus, change the "enter" key to "Search"
Android: singleline = "true" or press enter to search for a new line.
2. Set the keyboard listening for editview
Et_search_content.setonkeylistener (New onkeylistener () {// After the input, press the search key on the disk. [change the Enter key to the search key]
Public Boolean onkey (view V, int keycode, keyevent event ){
If (keycode = keyevent. keycode_enter) {// modify the Enter key function
// Hide the keyboard first
(Inputmethodmanager) getsystemservice (input_method_service ))
. Hidesoftinputfromwindow (
Findprojectactivity. This
. Getcurrentfocus ()
. Getwindowtoken (),
Inputmethodmanager. hide_not_always );
// Jump to the search result page
B = new bundle ();
B. putstring ("keyword", "". Equals (et_search_content.gettext (). tostring ())? "0": et_search_content.gettext (). tostring ());
B. putstring ("city", "". Equals (TV _province1.gettext (). tostring ())? "0": TV _province1.gettext (). tostring ());
B. putstring ("industry", "". Equals (TV _hangye1.gettext (). tostring ())? "0": TV _hangye1.gettext (). tostring ());
B. putstring ("fund", "". Equals (et_money.gettext (). tostring ())? "0": et_money.gettext (). tostring ());
If (TV _time.gettext (). Equals ("within one week ")){
B. putstring ("time", "W ");
}
If (TV _time.gettext (). Equals ("January ")){
B. putstring ("time", "M ");
}
If (TV _time.gettext (). Equals ("within six months ")){
B. putstring ("time", "hy ");
}
If (TV _time.gettext (). Equals ("one year ")){
B. putstring ("time", "Y ");
}
Utils. startactivity (findprojectactivity. This,
Projectlistactivity. Class, B );
}
Return false;
}
});