键盘高度
1 键盘高度
KeyBoard_H = Screen_H - StatusBar_H - AppRect_H 软键盘高度 = 分辨率高 - 状态栏高 - 应用可视高 于是有了这个方法
public static int getKeyboardHeight(Activity paramActivity) { int height = SystemUtils.getScreenHeight(paramActivity) - SystemUtils.getStatusBarHeight(paramActivity) - SystemUtils.getAppHeight(paramActivity); if (height == 0) { height = SharedPreferencesUtils.getIntShareData(“KeyboardHeight”, 787);//787为默认软键盘高度 基本差不离 }else{ SharedPreferencesUtils.putIntShareData(“KeyboardHeight”, height); } return height; }