use of com.android.launcher3.allapps.AlphabeticalAppsList in project Neo-Launcher by NeoApplications.
the class ConfigBuilder method setHotseatSearchView.
private void setHotseatSearchView() {
mNano.allAppsCols = mActivity.getDeviceProfile().inv.numColumns;
final int width = mActivity.getHotseat().getWidth();
final int dimensionPixelSize = mActivity.getResources().getDimensionPixelSize(R.dimen.dynamic_grid_edge_margin);
final Columns appCol = new Columns();
appCol.edgeMargin = dimensionPixelSize;
appCol.iconDistance = width - dimensionPixelSize - dimensionPixelSize;
appCol.height = mActivity.getDeviceProfile().allAppsCellHeightPx;
mNano.apps = appCol;
updateHotseatSearchDimens();
AlphabeticalAppsList apps = getAppsView().getApps();
mBubbleTextView = (BubbleTextView) mActivity.getLayoutInflater().inflate(R.layout.all_apps_icon, getAppsView(), false);
ViewGroup.LayoutParams layoutParams = mBubbleTextView.getLayoutParams();
layoutParams.height = appCol.height;
layoutParams.width = appCol.iconDistance / mNano.allAppsCols;
if (!apps.getApps().isEmpty()) {
mBubbleTextView.applyFromApplicationInfo(apps.getApps().get(0));
}
mBubbleTextView.measure(View.MeasureSpec.makeMeasureSpec(layoutParams.width, View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(layoutParams.height, View.MeasureSpec.EXACTLY));
mBubbleTextView.layout(0, 0, layoutParams.width, layoutParams.height);
final ArrayList<AppIndex> list = new ArrayList<>(mNano.allAppsCols);
mNano.index = list.toArray(new AppIndex[0]);
}
Aggregations