动态显示软键盘


@TargetApi(Build.VERSION_CODES.CUPCAKE)
public static void showSoftInput(Context context, EditText edit){
    edit.setFocusable( true );
    edit.setFocusableInTouchMode( true );
    edit.requestFocus();

    InputMethodManager inputManager = (InputMethodManager) context.getSystemService(Context.INPUT\_METHOD\_SERVICE);
    inputManager.showSoftInput(edit, 0 );
}
相关标签

扫一扫

在手机上阅读