Вам нужно установите для параметра EditText ответ на событие изменения фокусировки и скройте клавиатуру вручную,
public class Activity1 extends Activity implements OnFocusChangeListener
{
protected void onCreate(Bundle b)
{
.....
txtX = (EditText) findViewById(R.id.text_x);
txtX.setOnFocusChangeListener(this);
}
public void hideKeyboard(View view)
{
InputMethodManager inputMethodManager =(InputMethodManager)context.getSystemService(Activity.INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
@Override
public void onFocusChange(View view, boolean arg1)
{
if(! view.hasFocus())
hideKeyboard(view);
}
}
и в XML установить макет в фокусируемого
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusableInTouchMode="true" >
<EditText
android:id="@+id/text_x"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
вы осведомлены о ''? –
Возможный дубликат [Как скрыть Soft Keyboard при запуске активности] (http://stackoverflow.com/questions/18977187/how-to-hide-soft-keyboard-when-activity-starts) –
http: // разработчик. android.com/training/keyboard-input/visibility.html#ShowOnStart –