Adding sort switch in FolderPagedView

> Adding options column in DB to store generation purpose flags
> Storing isSorted flag in FolderInfo
> Adding a switch for A-Z sorting (only visible if pageCount > 1)
> When in sorted mode, spring-load snaps to the target location for 1.5 seconds

Change-Id: I8c7c778d2cc3ccbd35a2890a1a705e1c1a7e9a66
This commit is contained in:
Sunny Goyal committed 2015-03-17 14:49:38 -07:00
1 parent ce53e6dd12
commit 5d85c44fd8
9 files changed
+336 -47

No files matched your search

+5 -3
View File
@@ -961,6 +961,7 @@ public class LauncherModel extends BroadcastReceiver
final int screenIndex = c.getColumnIndexOrThrow(LauncherSettings.Favorites.SCREEN);
final int cellXIndex = c.getColumnIndexOrThrow(LauncherSettings.Favorites.CELLX);
final int cellYIndex = c.getColumnIndexOrThrow(LauncherSettings.Favorites.CELLY);
final int optionsIndex = c.getColumnIndexOrThrow(LauncherSettings.Favorites.OPTIONS);
FolderInfo folderInfo = null;
switch (c.getInt(itemTypeIndex)) {
@@ -975,6 +976,7 @@ public class LauncherModel extends BroadcastReceiver
folderInfo.screenId = c.getInt(screenIndex);
folderInfo.cellX = c.getInt(cellXIndex);
folderInfo.cellY = c.getInt(cellYIndex);
folderInfo.options = c.getInt(optionsIndex);
return folderInfo;
}
@@ -1862,9 +1864,8 @@ public class LauncherModel extends BroadcastReceiver
LauncherSettings.Favorites.RESTORED);
final int profileIdIndex = c.getColumnIndexOrThrow(
LauncherSettings.Favorites.PROFILE_ID);
//final int uriIndex = c.getColumnIndexOrThrow(LauncherSettings.Favorites.URI);
//final int displayModeIndex = c.getColumnIndexOrThrow(
// LauncherSettings.Favorites.DISPLAY_MODE);
final int optionsIndex = c.getColumnIndexOrThrow(
LauncherSettings.Favorites.OPTIONS);
ShortcutInfo info;
String intentDescription;
@@ -2114,6 +2115,7 @@ public class LauncherModel extends BroadcastReceiver
folderInfo.cellY = c.getInt(cellYIndex);
folderInfo.spanX = 1;
folderInfo.spanY = 1;
folderInfo.options = c.getInt(optionsIndex);
// check & update map of what's occupied
if (!checkItemPlacement(occupied, folderInfo)) {