Skip to content

Commit ee77cca

Browse files
author
Hugo Castelani
authored
Update ScreenUtils.java
1 parent 1895443 commit ee77cca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utilcode/src/main/java/com/blankj/utilcode/util/ScreenUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ public static int getSleepDuration() {
181181
* @return {@code true}: Yes<br>{@code false}: No
182182
*/
183183
public static boolean isTablet() {
184-
return Utils.getContext().getResources().getBoolean(R.bool.isTablet);
184+
return (Utils.getContext().getResources().getConfiguration().screenLayout
185+
& Configuration.SCREENLAYOUT_SIZE_MASK)
186+
>= Configuration.SCREENLAYOUT_SIZE_LARGE;
185187
}
186188
}

0 commit comments

Comments
 (0)