Loading app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ apply plugin: 'kotlin-android' // Manifest version information! def versionMajor = 1 def versionMinor = 3 def versionPatch = 0 def versionPatch = 1 android { compileSdkVersion rootProject.ext.compileSdkVersion Loading app/src/main/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ android:resumeWhilePausing="true" android:screenOrientation="nosensor" android:stateNotNeeded="true" android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize" android:theme="@style/HomeScreenTheme" android:windowSoftInputMode="adjustPan"> <intent-filter> Loading app/src/main/java/foundation/e/blisslauncher/BlissLauncher.java +4 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,10 @@ public class BlissLauncher extends Application { return deviceProfile; } public void resetDeviceProfile() { deviceProfile = new DeviceProfile(this); } public IconsHandler getIconsHandler() { if (iconsPackHandler == null) { iconsPackHandler = new IconsHandler(this); Loading app/src/main/java/foundation/e/blisslauncher/core/DeviceProfile.java +11 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import android.graphics.Point; import android.graphics.Rect; import android.graphics.RectF; import android.util.DisplayMetrics; import android.util.Log; import android.view.Display; import android.view.WindowManager; Loading @@ -27,6 +28,7 @@ public class DeviceProfile { public static Path path; private final float widthCm; private final float ratio; private int statusBarHeight; public int cellHeightWithoutPaddingPx; public int hotseatCellHeightWithoutPaddingPx; Loading Loading @@ -157,6 +159,7 @@ public class DeviceProfile { widthPx = realSize.x; double x = widthPx / dm.xdpi; ratio = dm.densityDpi / dm.xdpi; widthCm = (float) (x * 2.540001f); heightPx = realSize.y; Loading Loading @@ -231,7 +234,15 @@ public class DeviceProfile { iconSizePx = 213; }*/ float a = 1.578f; float b = 1.23f; Log.i(TAG, "updateIconSize: " + (int) a + " " + (int) b); iconSizePx = (int) (widthPx / widthCm); if (ratio >= 1) { iconSizePx = iconSizePx * (int) ratio; } iconTextSizePx = (int) (Utilities.pxFromSp(12, dm) * scale); iconDrawablePaddingPx = (availableWidthPx - iconSizePx * 4) / 5; Loading app/src/main/java/foundation/e/blisslauncher/core/Utilities.java +8 −2 Original line number Diff line number Diff line Loading @@ -229,6 +229,12 @@ public class Utilities { return defaultValue; } /** * Ensures that a value is within given bounds. Specifically: * If value is less than lowerBound, return lowerBound; else if value is greater than upperBound, * return upperBound; else return value unchanged. */ public static int boundToRange(int value, int lowerBound, int upperBound) { return Math.max(lowerBound, Math.min(value, upperBound)); } } Loading
app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ apply plugin: 'kotlin-android' // Manifest version information! def versionMajor = 1 def versionMinor = 3 def versionPatch = 0 def versionPatch = 1 android { compileSdkVersion rootProject.ext.compileSdkVersion Loading
app/src/main/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ android:resumeWhilePausing="true" android:screenOrientation="nosensor" android:stateNotNeeded="true" android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize" android:theme="@style/HomeScreenTheme" android:windowSoftInputMode="adjustPan"> <intent-filter> Loading
app/src/main/java/foundation/e/blisslauncher/BlissLauncher.java +4 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,10 @@ public class BlissLauncher extends Application { return deviceProfile; } public void resetDeviceProfile() { deviceProfile = new DeviceProfile(this); } public IconsHandler getIconsHandler() { if (iconsPackHandler == null) { iconsPackHandler = new IconsHandler(this); Loading
app/src/main/java/foundation/e/blisslauncher/core/DeviceProfile.java +11 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import android.graphics.Point; import android.graphics.Rect; import android.graphics.RectF; import android.util.DisplayMetrics; import android.util.Log; import android.view.Display; import android.view.WindowManager; Loading @@ -27,6 +28,7 @@ public class DeviceProfile { public static Path path; private final float widthCm; private final float ratio; private int statusBarHeight; public int cellHeightWithoutPaddingPx; public int hotseatCellHeightWithoutPaddingPx; Loading Loading @@ -157,6 +159,7 @@ public class DeviceProfile { widthPx = realSize.x; double x = widthPx / dm.xdpi; ratio = dm.densityDpi / dm.xdpi; widthCm = (float) (x * 2.540001f); heightPx = realSize.y; Loading Loading @@ -231,7 +234,15 @@ public class DeviceProfile { iconSizePx = 213; }*/ float a = 1.578f; float b = 1.23f; Log.i(TAG, "updateIconSize: " + (int) a + " " + (int) b); iconSizePx = (int) (widthPx / widthCm); if (ratio >= 1) { iconSizePx = iconSizePx * (int) ratio; } iconTextSizePx = (int) (Utilities.pxFromSp(12, dm) * scale); iconDrawablePaddingPx = (availableWidthPx - iconSizePx * 4) / 5; Loading
app/src/main/java/foundation/e/blisslauncher/core/Utilities.java +8 −2 Original line number Diff line number Diff line Loading @@ -229,6 +229,12 @@ public class Utilities { return defaultValue; } /** * Ensures that a value is within given bounds. Specifically: * If value is less than lowerBound, return lowerBound; else if value is greater than upperBound, * return upperBound; else return value unchanged. */ public static int boundToRange(int value, int lowerBound, int upperBound) { return Math.max(lowerBound, Math.min(value, upperBound)); } }