mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 14:35:03 +01:00
Changed isTablet check
This commit is contained in:
parent
3eed85a31d
commit
4d5b43f6d7
5 changed files with 18 additions and 2 deletions
|
@ -80,7 +80,7 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 8
|
minSdkVersion 8
|
||||||
targetSdkVersion 19
|
targetSdkVersion 19
|
||||||
versionCode 327
|
versionCode 328
|
||||||
versionName "1.9.0"
|
versionName "1.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class AndroidUtilities {
|
||||||
public static int statusBarHeight = 0;
|
public static int statusBarHeight = 0;
|
||||||
public static float density = 1;
|
public static float density = 1;
|
||||||
public static Point displaySize = new Point();
|
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[] arrColors = {0xffee4928, 0xff41a903, 0xffe09602, 0xff0f94ed, 0xff8f3bf7, 0xfffc4380, 0xff00a1c4, 0xffeb7002};
|
||||||
public static int[] arrUsersAvatars = {
|
public static int[] arrUsersAvatars = {
|
||||||
|
@ -268,7 +269,10 @@ public class AndroidUtilities {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isTablet() {
|
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) {
|
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 a new issue