Changed interaction dynamics in EditAlarmActivity
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.philliphsu.clock2.util;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
/**
|
||||
* Created by Phillip Hsu on 6/5/2016.
|
||||
*/
|
||||
public class KeyboardUtils {
|
||||
|
||||
public static void hideKeyboard(Activity a) {
|
||||
View view = a.getCurrentFocus();
|
||||
if (view != null) {
|
||||
InputMethodManager imm = (InputMethodManager)
|
||||
a.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user