[Search] Support flexible results-per-row in AllApps
Bug: 181987314 Test: Manual Change-Id: Idc3d24dafc42944a7cc925e0991118c86a89b318
This commit is contained in:
1 parent
9cde419ee0
commit
e2358949d4
2 files changed
+19
-11
No files matched your search
@@ -50,11 +50,18 @@ public abstract class SearchAdapterProvider {
|
||||
public abstract AllAppsGridAdapter.ViewHolder onCreateViewHolder(LayoutInflater layoutInflater,
|
||||
ViewGroup parent, int viewType);
|
||||
|
||||
/**
|
||||
* Returns supported item per row combinations supported
|
||||
*/
|
||||
public int[] getSupportedItemsPerRow() {
|
||||
return new int[]{};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns how many cells a view should span
|
||||
*/
|
||||
public int getGridSpanSize(int viewType, int appsPerRow) {
|
||||
return appsPerRow * AllAppsGridAdapter.SPAN_MULTIPLIER;
|
||||
public int getItemsPerRow(int viewType, int appsPerRow) {
|
||||
return appsPerRow;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user