Turn no Auto Soft Input - Android android.view.inputmethod

Android examples for android.view.inputmethod:InputMethodManager

Description

Turn no Auto Soft Input

Demo Code

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.WindowManager;

public class Main{

    public static void noAutoSoftInput(Activity context) {

        context.getWindow().setSoftInputMode(
                WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
    }/*  www  .j  a  va 2  s  .co m*/

}

Related Tutorials