summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AlphabeticalAppsList.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-03-13 11:14:16 -0700
committerWinson Chung <winsonc@google.com>2015-03-13 11:48:45 -0700
commit888b3a10bf1e99192f12c844ee275c6f360d6b34 (patch)
tree0dd028c7b444b7deb9a9c34a91f1efe3a81d1466 /src/com/android/launcher3/AlphabeticalAppsList.java
parent93f98eaf1800024cb2f28379bdd997f3debae63a (diff)
downloadandroid_packages_apps_Trebuchet-888b3a10bf1e99192f12c844ee275c6f360d6b34.tar.gz
android_packages_apps_Trebuchet-888b3a10bf1e99192f12c844ee275c6f360d6b34.tar.bz2
android_packages_apps_Trebuchet-888b3a10bf1e99192f12c844ee275c6f360d6b34.zip
Minor changes to apps view.
- Ensuring that apps with numbers and in other locals have a section header. - Adding an empty state when there are no apps with the current filter - Removing unnecessary call to check AppInfos Change-Id: I9dc541c680475b98745fa257ad7e4af06e3966c9
Diffstat (limited to 'src/com/android/launcher3/AlphabeticalAppsList.java')
-rw-r--r--src/com/android/launcher3/AlphabeticalAppsList.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/launcher3/AlphabeticalAppsList.java b/src/com/android/launcher3/AlphabeticalAppsList.java
index 2847afc89..c1d2738da 100644
--- a/src/com/android/launcher3/AlphabeticalAppsList.java
+++ b/src/com/android/launcher3/AlphabeticalAppsList.java
@@ -78,9 +78,7 @@ public class AlphabeticalAppsList {
* Returns the section name for the application.
*/
public String getSectionNameForApp(AppInfo info) {
- String title = info.title.toString();
- String sectionName = mIndexer.getBucketLabel(mIndexer.getBucketIndex(title));
- return sectionName;
+ return mIndexer.computeSectionName(info.title.toString().trim());
}
/**
@@ -91,6 +89,13 @@ public class AlphabeticalAppsList {
}
/**
+ * Returns whether there are no filtered results.
+ */
+ public boolean hasNoFilteredResults() {
+ return (mFilter != null) && mFilteredApps.isEmpty();
+ }
+
+ /**
* Sets the current filter for this list of apps.
*/
public void setFilter(Filter f) {