EditText: show input window, retrieve text, and change its height?

You could use 2 events to acheive this. First is onTextChangedListener if you want to get text from EditText each time it is edited. Second is onKeyDownListener.

You can check whether the key equals to enter. GetText().toString() is used to get the text of EditText. Here is a code snippet: myEditText.

SetOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if ((event.getAction() == KeyEvent. ACTION_DOWN) && (keyCode == KeyEvent. KEYCODE_ENTER)) { String tmp = draw.myEditText.getText().toString().trim(); //to hide keyboard InputMethodManager imm = (InputMethodManager)getSystemService(Context.

INPUT_METHOD_SERVICE); imm. DeSoftInputFromWindow(myEditText.getWindowToken(), 0); } return false; } }).

Use this code edtSearch. SetOnEditorActionListener(new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == 0 || actionId == 6) { // get edit text here String editValue = edtSearch.getText().toString(); } return false; } }).

First is onTextChangedListener if you want to get text from EditText each time it is edited. Second is onKeyDownListener. You can check whether the key equals to enter.

GetText().toString() is used to get the text of EditText.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions