Q:

EditText is selected automatically when project is run

I have a problem.
In the first Activity of my app I have an EditText at the very top of the page inside a linear layout. Problem is that when i run my app, always the EditText is selected for which a keyboard appears on the screen. Is there any way to tell the app not to have the EditText already selected when the app runs?
Thanks in advance,
Waiting for your reply...

A:

You can make a method and call it on onCreate() method:
public static void hideSoftKeyboard (Activity activity, View view) {
 InputMethodManager imm =(InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);
 imm.hideSoftInputFromWindow(view.getApplicationWindowToken(), 0);}

or simply you can add in manifest file like this:
<activity android:name="com.your.package.ActivityName"
      android:windowSoftInputMode="stateHidden"  />

