Loading src/com/android/launcher3/Launcher.java +1 −1 Original line number Diff line number Diff line Loading @@ -651,7 +651,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche mDragLayer.onOneHandedModeStateChanged(activated); } private void initDeviceProfile(InvariantDeviceProfile idp) { protected void initDeviceProfile(InvariantDeviceProfile idp) { // Load configuration-specific DeviceProfile mDeviceProfile = idp.getDeviceProfile(this); if (isInMultiWindowMode()) { Loading src/com/android/launcher3/allapps/AlphabeticalAppsList.java +10 −9 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement private final ArrayList<AdapterItem> mSearchResults = new ArrayList<>(); private BaseAllAppsAdapter<T> mAdapter; private AppInfoComparator mAppNameComparator; private final int mNumAppsPerRow; private final int mNumAppsPerRowAllApps; private int mNumAppRowsInAdapter; private ItemInfoMatcher mItemFilter; Loading @@ -94,7 +94,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement mActivityContext = ActivityContext.lookupContext(context); mAppNameComparator = new AppInfoComparator(context); mWorkAdapterProvider = adapterProvider; mNumAppsPerRow = mActivityContext.getDeviceProfile().inv.numColumns; mNumAppsPerRowAllApps = mActivityContext.getDeviceProfile().inv.numAllAppsColumns; mAllAppsStore.addUpdateListener(this); } Loading Loading @@ -336,7 +336,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement } } if (mNumAppsPerRow != 0) { if (mNumAppsPerRowAllApps != 0) { // Update the number of rows in the adapter after we do all the merging (otherwise, we // would have to shift the values again) int numAppsInSection = 0; Loading @@ -344,10 +344,10 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement int rowIndex = -1; for (AdapterItem item : mAdapterItems) { item.rowIndex = 0; if (AllAppsGridAdapter.isDividerViewType(item.viewType)) { if (BaseAllAppsAdapter.isDividerViewType(item.viewType)) { numAppsInSection = 0; } else if (AllAppsGridAdapter.isIconViewType(item.viewType)) { if (numAppsInSection % mNumAppsPerRow == 0) { } else if (BaseAllAppsAdapter.isIconViewType(item.viewType)) { if (numAppsInSection % mNumAppsPerRowAllApps == 0) { numAppsInRow = 0; rowIndex++; } Loading @@ -365,12 +365,13 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement float rowFraction = 1f / mNumAppRowsInAdapter; for (FastScrollSectionInfo info : mFastScrollerSections) { AdapterItem item = info.fastScrollToItem; if (!AllAppsGridAdapter.isIconViewType(item.viewType)) { if (!BaseAllAppsAdapter.isIconViewType(item.viewType)) { info.touchFraction = 0f; continue; } float subRowFraction = item.rowAppIndex * (rowFraction / mNumAppsPerRow); float subRowFraction = item.rowAppIndex * (rowFraction / mNumAppsPerRowAllApps); info.touchFraction = item.rowIndex * rowFraction + subRowFraction; } break; Loading @@ -379,7 +380,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement float cumulativeTouchFraction = 0f; for (FastScrollSectionInfo info : mFastScrollerSections) { AdapterItem item = info.fastScrollToItem; if (!AllAppsGridAdapter.isIconViewType(item.viewType)) { if (!BaseAllAppsAdapter.isIconViewType(item.viewType)) { info.touchFraction = 0f; continue; } Loading src/com/android/launcher3/allapps/BaseAllAppsAdapter.java +4 −4 Original line number Diff line number Diff line Loading @@ -163,10 +163,10 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex protected String mEmptySearchMessage; protected int mAppsPerRow; private final LayoutInflater mLayoutInflater; private final OnClickListener mOnIconClickListener; private OnLongClickListener mOnIconLongClickListener = INSTANCE_ALL_APPS; private OnFocusChangeListener mIconFocusListener; protected final LayoutInflater mLayoutInflater; protected final OnClickListener mOnIconClickListener; protected OnLongClickListener mOnIconLongClickListener = INSTANCE_ALL_APPS; protected OnFocusChangeListener mIconFocusListener; // The click listener to send off to the market app, updated each time the search query changes. private OnClickListener mMarketSearchClickListener; private final int mExtraHeight; Loading Loading
src/com/android/launcher3/Launcher.java +1 −1 Original line number Diff line number Diff line Loading @@ -651,7 +651,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche mDragLayer.onOneHandedModeStateChanged(activated); } private void initDeviceProfile(InvariantDeviceProfile idp) { protected void initDeviceProfile(InvariantDeviceProfile idp) { // Load configuration-specific DeviceProfile mDeviceProfile = idp.getDeviceProfile(this); if (isInMultiWindowMode()) { Loading
src/com/android/launcher3/allapps/AlphabeticalAppsList.java +10 −9 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement private final ArrayList<AdapterItem> mSearchResults = new ArrayList<>(); private BaseAllAppsAdapter<T> mAdapter; private AppInfoComparator mAppNameComparator; private final int mNumAppsPerRow; private final int mNumAppsPerRowAllApps; private int mNumAppRowsInAdapter; private ItemInfoMatcher mItemFilter; Loading @@ -94,7 +94,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement mActivityContext = ActivityContext.lookupContext(context); mAppNameComparator = new AppInfoComparator(context); mWorkAdapterProvider = adapterProvider; mNumAppsPerRow = mActivityContext.getDeviceProfile().inv.numColumns; mNumAppsPerRowAllApps = mActivityContext.getDeviceProfile().inv.numAllAppsColumns; mAllAppsStore.addUpdateListener(this); } Loading Loading @@ -336,7 +336,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement } } if (mNumAppsPerRow != 0) { if (mNumAppsPerRowAllApps != 0) { // Update the number of rows in the adapter after we do all the merging (otherwise, we // would have to shift the values again) int numAppsInSection = 0; Loading @@ -344,10 +344,10 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement int rowIndex = -1; for (AdapterItem item : mAdapterItems) { item.rowIndex = 0; if (AllAppsGridAdapter.isDividerViewType(item.viewType)) { if (BaseAllAppsAdapter.isDividerViewType(item.viewType)) { numAppsInSection = 0; } else if (AllAppsGridAdapter.isIconViewType(item.viewType)) { if (numAppsInSection % mNumAppsPerRow == 0) { } else if (BaseAllAppsAdapter.isIconViewType(item.viewType)) { if (numAppsInSection % mNumAppsPerRowAllApps == 0) { numAppsInRow = 0; rowIndex++; } Loading @@ -365,12 +365,13 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement float rowFraction = 1f / mNumAppRowsInAdapter; for (FastScrollSectionInfo info : mFastScrollerSections) { AdapterItem item = info.fastScrollToItem; if (!AllAppsGridAdapter.isIconViewType(item.viewType)) { if (!BaseAllAppsAdapter.isIconViewType(item.viewType)) { info.touchFraction = 0f; continue; } float subRowFraction = item.rowAppIndex * (rowFraction / mNumAppsPerRow); float subRowFraction = item.rowAppIndex * (rowFraction / mNumAppsPerRowAllApps); info.touchFraction = item.rowIndex * rowFraction + subRowFraction; } break; Loading @@ -379,7 +380,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement float cumulativeTouchFraction = 0f; for (FastScrollSectionInfo info : mFastScrollerSections) { AdapterItem item = info.fastScrollToItem; if (!AllAppsGridAdapter.isIconViewType(item.viewType)) { if (!BaseAllAppsAdapter.isIconViewType(item.viewType)) { info.touchFraction = 0f; continue; } Loading
src/com/android/launcher3/allapps/BaseAllAppsAdapter.java +4 −4 Original line number Diff line number Diff line Loading @@ -163,10 +163,10 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex protected String mEmptySearchMessage; protected int mAppsPerRow; private final LayoutInflater mLayoutInflater; private final OnClickListener mOnIconClickListener; private OnLongClickListener mOnIconLongClickListener = INSTANCE_ALL_APPS; private OnFocusChangeListener mIconFocusListener; protected final LayoutInflater mLayoutInflater; protected final OnClickListener mOnIconClickListener; protected OnLongClickListener mOnIconLongClickListener = INSTANCE_ALL_APPS; protected OnFocusChangeListener mIconFocusListener; // The click listener to send off to the market app, updated each time the search query changes. private OnClickListener mMarketSearchClickListener; private final int mExtraHeight; Loading