/**
* 判斷軟鍵盤是否彈出
*/
public static boolean isSHowKeyboard(Context context, View v) {
InputMethodManager imm = (InputMethodManager) context.getSystemService(context.INPUT_METHOD_SERVICE);
if (imm.hideSoftInputFromWindow(v.getWindowToken(), 0)) {
imm.showSoftInput(v, 0);
return true;
//軟鍵盤已彈出
} else {
return false;
//軟鍵盤未彈出
}
}