summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-12-18 14:54:09 -0800
committerTom Powell <zifnab@zifnab06.net>2017-03-26 15:52:43 -0700
commitc25d5fbb5ac6ee6b04ce525ff3d24ebcf705fcc3 (patch)
tree35cfb1599595916088fb9d54bcb170871418cb37 /src
parent44d162e914b5da853ca59b2e96e9c58bbeafe141 (diff)
downloadandroid_packages_apps_Trebuchet-c25d5fbb5ac6ee6b04ce525ff3d24ebcf705fcc3.tar.gz
android_packages_apps_Trebuchet-c25d5fbb5ac6ee6b04ce525ff3d24ebcf705fcc3.tar.bz2
android_packages_apps_Trebuchet-c25d5fbb5ac6ee6b04ce525ff3d24ebcf705fcc3.zip
Trebuchet: Fix some icon size and flush cache issues
Change-Id: I6aa4bc09fd888559d3a1795f4f0968f9b89534d9
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/InvariantDeviceProfile.java40
-rw-r--r--src/com/android/launcher3/Launcher.java2
-rw-r--r--src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java2
3 files changed, 22 insertions, 22 deletions
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index a03cc31f2..72bb4f202 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -236,41 +236,41 @@ public class InvariantDeviceProfile {
// width, height, #rows, #columns, #folder rows, #folder columns,
// iconSize, iconTextSize, #hotseat, #hotseatIconSize, defaultLayoutId.
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Super Short Stubby",
- 255, 300, 2, 3, 2, 3, 3, (useLargeIcons? DEFAULT_ICON_SIZE_DP: 48), 13, 3,
- (useLargeIcons? DEFAULT_ICON_SIZE_DP: 48), R.xml.default_workspace_4x4));
+ 255, 300, 2, 3, 2, 3, 3, (useLargeIcons? 58 : 46), 13, 3,
+ (useLargeIcons? 58 : 46), R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Shorter Stubby",
- 255, 400, 3, 3, 3, 3, 3, (useLargeIcons? DEFAULT_ICON_SIZE_DP: 48), 13, 3,
- (useLargeIcons? DEFAULT_ICON_SIZE_DP: 48), R.xml.default_workspace_4x4));
+ 255, 400, 3, 3, 3, 3, 3, (useLargeIcons? 58 : 46), 13, 3,
+ (useLargeIcons? 58 : 46), R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Short Stubby",
- 275, 420, 3, 4, 3, 4, 4, (useLargeIcons? DEFAULT_ICON_SIZE_DP: 48), 13, 5,
- (useLargeIcons? DEFAULT_ICON_SIZE_DP: 48), R.xml.default_workspace_4x4));
+ 275, 420, 3, 4, 3, 4, 4, (useLargeIcons? 58 : 46), 13, 5,
+ (useLargeIcons? 58 : 46), R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Stubby",
- 255, 450, 3, 4, 3, 4, 4, (useLargeIcons? DEFAULT_ICON_SIZE_DP: 48), 13, 5,
- (useLargeIcons? DEFAULT_ICON_SIZE_DP: 48), R.xml.default_workspace_4x4));
+ 255, 450, 3, 4, 3, 4, 4, (useLargeIcons? 58 : 46), 13, 5,
+ (useLargeIcons? 58 : 46), R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus S",
- 296, 491.33f, 4, 4, 4, 4, 4, (useLargeIcons? DEFAULT_ICON_SIZE_DP : 48), 13, 5,
- (useLargeIcons? DEFAULT_ICON_SIZE_DP: 48), R.xml.default_workspace_4x4));
+ 296, 491.33f, 4, 4, 4, 4, 4, (useLargeIcons? 58 : 46), 13, 5,
+ (useLargeIcons? 58 : 46), R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus 4",
- 335, 567, 4, 4, 4, 4, 4, (useLargeIcons ? 70 : DEFAULT_ICON_SIZE_DP), 13, 5,
+ 335, 567, 4, 4, 4, 4, 4, (useLargeIcons ? DEFAULT_ICON_SIZE_DP : 56), 13, 5,
(useLargeIcons? 68 : 56), R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus 5",
- 359, 567, 4, 4, 4, 4, 4, (useLargeIcons ? 70 : DEFAULT_ICON_SIZE_DP), 13, 5,
+ 359, 567, 4, 4, 4, 4, 4, (useLargeIcons ? DEFAULT_ICON_SIZE_DP : 56), 13, 5,
(useLargeIcons? 68 : 56), R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Large Phone",
- 406, 694, 5, 5, 4, 4, 4, (useLargeIcons ? 76 : 64), 14.4f, 5,
- (useLargeIcons ? 68 : 56), R.xml.default_workspace_5x5));
+ 406, 694, 5, 5, 4, 4, 4, (useLargeIcons ? 68 : 56), 14.4f, 5,
+ (useLargeIcons ? 60 : 48), R.xml.default_workspace_5x5));
// The tablet profile is odd in that the landscape orientation
// also includes the nav bar on the side
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus 7",
- 575, 904, 5, 6, 4, 5, 4, (useLargeIcons ? 88 : 72), 14.4f, 7,
- (useLargeIcons ? 72 : 60), R.xml.default_workspace_5x6));
+ 575, 904, 5, 6, 4, 5, 4, (useLargeIcons ? 76 : 60), 14.4f, 7,
+ (useLargeIcons ? 60 : 48), R.xml.default_workspace_5x6));
// Larger tablet profiles always have system bars on the top & bottom
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus 10",
- 727, 1207, 5, 6, 4, 5, 4, (useLargeIcons ? 92 : 76), 14.4f, 7,
- (useLargeIcons ? 76 : 64), R.xml.default_workspace_5x6));
+ 727, 1207, 5, 6, 4, 5, 4, (useLargeIcons ? 80 : 64), 14.4f, 7,
+ (useLargeIcons ? 68 : 56), R.xml.default_workspace_5x6));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("20-inch Tablet",
- 1527, 2527, 7, 7, 6, 6, 4, (useLargeIcons ? 124 : 100), 20, 7,
- (useLargeIcons ? 84 : 72), R.xml.default_workspace_4x4));
+ 1527, 2527, 7, 7, 6, 6, 4, (useLargeIcons ? 104 : 80), 20, 7,
+ (useLargeIcons ? 76 : 64), R.xml.default_workspace_4x4));
return predefinedDeviceProfiles;
}
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index f8044aa5b..8925a72a2 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1808,7 +1808,7 @@ public class Launcher extends Activity
mModel = app.setLauncher(this);
mIconCache = app.getIconCache();
- mIconCache.flushInvalidIcons(mDeviceProfile);
+ mIconCache.flush();
}
/**
diff --git a/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java b/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
index e24dbe7af..2d140fcbb 100644
--- a/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
+++ b/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
@@ -312,7 +312,7 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter {
onSettingsBooleanChanged(v,
SettingsProvider.SETTINGS_UI_GENERAL_ICONS_LARGE,
R.bool.preferences_interface_general_icons_large_default);
- mLauncher.reloadLauncher(true, false);
+ mLauncher.reloadLauncher(true, true);
break;
case 1:
Intent intent = new Intent();