mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Tweaking section processing for different languages
- Ensuring that apps with non-letter/digit characters are ordered last in the misc bucket - Removing duplicate latin-alphabet sections for Simplified Chinese - Adding more appropriate misc bucket label for Japanese Bug 21022854 Change-Id: I62c7b219820ef88787fcfa83f1bd4202f16f9c0c
This commit is contained in:
@@ -63,11 +63,7 @@ class AppsGridAdapter extends RecyclerView.Adapter<AppsGridAdapter.ViewHolder> {
|
||||
|
||||
if (mApps.getAdapterItems().get(position).isSectionHeader) {
|
||||
// Section break spans full width
|
||||
if (AppsContainerView.GRID_HIDE_SECTION_HEADERS) {
|
||||
return 0;
|
||||
} else {
|
||||
return mAppsPerRow;
|
||||
}
|
||||
return mAppsPerRow;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
@@ -290,10 +286,8 @@ class AppsGridAdapter extends RecyclerView.Adapter<AppsGridAdapter.ViewHolder> {
|
||||
mTouchListener = touchListener;
|
||||
mIconClickListener = iconClickListener;
|
||||
mIconLongClickListener = iconLongClickListener;
|
||||
if (!AppsContainerView.GRID_HIDE_SECTION_HEADERS) {
|
||||
mStartMargin = res.getDimensionPixelSize(R.dimen.apps_grid_view_start_margin);
|
||||
mSectionHeaderOffset = res.getDimensionPixelSize(R.dimen.apps_grid_section_y_offset);
|
||||
}
|
||||
mStartMargin = res.getDimensionPixelSize(R.dimen.apps_grid_view_start_margin);
|
||||
mSectionHeaderOffset = res.getDimensionPixelSize(R.dimen.apps_grid_section_y_offset);
|
||||
mPaddingStart = res.getDimensionPixelSize(R.dimen.apps_container_inset);
|
||||
|
||||
mSectionTextPaint = new Paint();
|
||||
@@ -342,10 +336,7 @@ class AppsGridAdapter extends RecyclerView.Adapter<AppsGridAdapter.ViewHolder> {
|
||||
*/
|
||||
public RecyclerView.ItemDecoration getItemDecoration() {
|
||||
// We don't draw any headers when we are uncomfortably dense
|
||||
if (!AppsContainerView.GRID_HIDE_SECTION_HEADERS) {
|
||||
return mItemDecoration;
|
||||
}
|
||||
return null;
|
||||
return mItemDecoration;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user