Activity 起動時、キーボードを表示させない。

onCreate で、setContentView の前に SOFT_INPUT_STATE_ALWAYS_HIDDEN セットして実行して表示させない

getWindow().setSoftInputMode(
    android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN
);

setContentView(R.layout.entrance);


さらに、フォーカスを外す場合、レイアウトxml
  android:focusable="true"
  android:focusableInTouchMode="true"

とした TextField で、requestFocus を指定してフォーカス対象を指定する。

<TextView
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:focusable="true"
     android:focusableInTouchMode="true"
 >
       <requestFocus />
</TextView>

<EditText
     android:id="@+id/editText"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:ems="4"
     android:maxLength="4"
     android:layout_gravity="center_horizontal"
     android:inputType="textPassword" >
</EditText>

android:ems は、Widget の幅