File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
utilcode/src/main/java/com/blankj/utilcode/util Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ public static void toggleSoftInput() {
105105 * @return {@code true}: 可见<br>{@code false}: 不可见
106106 */
107107 public static boolean isSoftInputVisible (final Activity activity ) {
108- return getContentViewInvisibleHeight (activity ) >= 200 ;
108+ return isSoftInputVisible (activity , 200 ) ;
109109 }
110110
111111 /**
@@ -124,7 +124,7 @@ private static int getContentViewInvisibleHeight(final Activity activity) {
124124 final View contentView = activity .findViewById (android .R .id .content );
125125 Rect r = new Rect ();
126126 contentView .getWindowVisibleDisplayFrame (r );
127- return contentView .getRootView ().getHeight () - ( r . top - r . bottom );
127+ return contentView .getRootView ().getHeight () - r . height ( );
128128 }
129129
130130 /**
You can’t perform that action at this time.
0 commit comments