summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AppsContainerRecyclerView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/AppsContainerRecyclerView.java')
-rw-r--r--src/com/android/launcher3/AppsContainerRecyclerView.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/launcher3/AppsContainerRecyclerView.java b/src/com/android/launcher3/AppsContainerRecyclerView.java
index 6556cf920..edb6f0c6e 100644
--- a/src/com/android/launcher3/AppsContainerRecyclerView.java
+++ b/src/com/android/launcher3/AppsContainerRecyclerView.java
@@ -229,7 +229,7 @@ public class AppsContainerRecyclerView extends BaseContainerRecyclerView {
* Draws the fast scroller popup.
*/
private void drawFastScrollerPopup(Canvas canvas) {
- if (mFastScrollAlpha > 0f) {
+ if (mFastScrollAlpha > 0f && !mFastScrollSectionName.isEmpty()) {
int x;
int y;
boolean isRtl = (getResources().getConfiguration().getLayoutDirection() ==
@@ -381,16 +381,16 @@ public class AppsContainerRecyclerView extends BaseContainerRecyclerView {
}
/**
- * Returns the row index for a given position in the list.
+ * Returns the row index for a app index in the list.
*/
- private int findRowForAppIndex(int position) {
+ private int findRowForAppIndex(int index) {
List<AlphabeticalAppsList.SectionInfo> sections = mApps.getSections();
int appIndex = 0;
int rowCount = 0;
for (AlphabeticalAppsList.SectionInfo info : sections) {
int numRowsInSection = (int) Math.ceil((float) info.numApps / mNumAppsPerRow);
- if (appIndex + info.numApps > position) {
- return rowCount + ((position - appIndex) / mNumAppsPerRow);
+ if (appIndex + info.numApps > index) {
+ return rowCount + ((index - appIndex) / mNumAppsPerRow);
}
appIndex += info.numApps;
rowCount += numRowsInSection;