mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2024-11-30 07:00:21 +01:00
Changed isTablet check
This commit is contained in:
parent
3eed85a31d
commit
4d5b43f6d7
@ -80,7 +80,7 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 19
|
||||
versionCode 327
|
||||
versionCode 328
|
||||
versionName "1.9.0"
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ public class AndroidUtilities {
|
||||
public static int statusBarHeight = 0;
|
||||
public static float density = 1;
|
||||
public static Point displaySize = new Point();
|
||||
private static Boolean isTablet = null;
|
||||
|
||||
public static int[] arrColors = {0xffee4928, 0xff41a903, 0xffe09602, 0xff0f94ed, 0xff8f3bf7, 0xfffc4380, 0xff00a1c4, 0xffeb7002};
|
||||
public static int[] arrUsersAvatars = {
|
||||
@ -268,7 +269,10 @@ public class AndroidUtilities {
|
||||
}
|
||||
|
||||
public static boolean isTablet() {
|
||||
return (ApplicationLoader.applicationContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
|
||||
if (isTablet == null) {
|
||||
isTablet = ApplicationLoader.applicationContext.getResources().getBoolean(R.bool.isTablet);
|
||||
}
|
||||
return isTablet;
|
||||
}
|
||||
|
||||
public static int getColorIndex(int id) {
|
||||
|
4
TMessagesProj/src/main/res/values-sw600dp/values.xml
Normal file
4
TMessagesProj/src/main/res/values-sw600dp/values.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="isTablet">true</bool>
|
||||
</resources>
|
4
TMessagesProj/src/main/res/values-sw720dp/values.xml
Normal file
4
TMessagesProj/src/main/res/values-sw720dp/values.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="isTablet">true</bool>
|
||||
</resources>
|
4
TMessagesProj/src/main/res/values/values.xml
Normal file
4
TMessagesProj/src/main/res/values/values.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="isTablet">false</bool>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user