hide Soft Input via Activity - Android Activity

Android examples for Activity:Activity Feature

Description

hide Soft Input via Activity

Demo Code


//package com.java2s;

import android.app.Activity;

import android.view.WindowManager;

public class Main {

    public static void hideSoftInput(Activity activity) {
        activity.getWindow().setSoftInputMode(
                WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
    }/*from   www.j a v  a2s.  c o m*/
}

Related Tutorials