views:

140

answers:

2

friends,

i have a EditText on simple activity with a button. when every i move from one activity to this acivity focus is automatically set to EditText and keyboard appears in phone.

i dont want to open keyboard untill i click on editText.

can any one guide me what should i do?

any help would be appriciated.

+1  A: 

Check this out EditText.setInputType(InputType.TYPE_NULL);

Vishal
i have used itEditText TextBox=(EditText)findViewById(R.id.txtMessage); TextBox.setInputType(InputType.TYPE_NULL); but when i click on edit text next time kayboard does not appears.
UMMA
+1  A: 

You can use the following line of code to make sure the keyboard doesn't pop up when the activity starts and only pops up when a user clicks into an EditText

Place it in the onCreate method of your activity

this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
Donal Rafferty