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() {
105
105
* @return {@code true}: 可见<br>{@code false}: 不可见
106
106
*/
107
107
public static boolean isSoftInputVisible (final Activity activity ) {
108
- return getContentViewInvisibleHeight (activity ) >= 200 ;
108
+ return isSoftInputVisible (activity , 200 ) ;
109
109
}
110
110
111
111
/**
@@ -124,7 +124,7 @@ private static int getContentViewInvisibleHeight(final Activity activity) {
124
124
final View contentView = activity .findViewById (android .R .id .content );
125
125
Rect r = new Rect ();
126
126
contentView .getWindowVisibleDisplayFrame (r );
127
- return contentView .getRootView ().getHeight () - ( r . top - r . bottom );
127
+ return contentView .getRootView ().getHeight () - r . height ( );
128
128
}
129
129
130
130
/**
You can’t perform that action at this time.
0 commit comments