diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 0fac4cf04..e21615dc1 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -80,7 +80,7 @@ android { defaultConfig { minSdkVersion 8 targetSdkVersion 19 - versionCode 327 + versionCode 328 versionName "1.9.0" } } diff --git a/TMessagesProj/src/main/java/org/telegram/android/AndroidUtilities.java b/TMessagesProj/src/main/java/org/telegram/android/AndroidUtilities.java index 72a779498..5eacf9f48 100644 --- a/TMessagesProj/src/main/java/org/telegram/android/AndroidUtilities.java +++ b/TMessagesProj/src/main/java/org/telegram/android/AndroidUtilities.java @@ -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) { diff --git a/TMessagesProj/src/main/res/values-sw600dp/values.xml b/TMessagesProj/src/main/res/values-sw600dp/values.xml new file mode 100644 index 000000000..d3a0e92c9 --- /dev/null +++ b/TMessagesProj/src/main/res/values-sw600dp/values.xml @@ -0,0 +1,4 @@ + + + true + \ No newline at end of file diff --git a/TMessagesProj/src/main/res/values-sw720dp/values.xml b/TMessagesProj/src/main/res/values-sw720dp/values.xml new file mode 100644 index 000000000..d3a0e92c9 --- /dev/null +++ b/TMessagesProj/src/main/res/values-sw720dp/values.xml @@ -0,0 +1,4 @@ + + + true + \ No newline at end of file diff --git a/TMessagesProj/src/main/res/values/values.xml b/TMessagesProj/src/main/res/values/values.xml new file mode 100644 index 000000000..f855de6a2 --- /dev/null +++ b/TMessagesProj/src/main/res/values/values.xml @@ -0,0 +1,4 @@ + + + false + \ No newline at end of file