mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Extract out common adapter logic to support different AllApps layouts
Test: Manual tests. Refactoring, all existing tests should pass. Bug: 216150568 Change-Id: I1068e75d0b4a33d402a7d68e237d2484ab3a1e01
This commit is contained in:
@@ -25,6 +25,9 @@ import android.view.WindowInsets;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.android.launcher3.allapps.AllAppsGridAdapter;
|
||||
import com.android.launcher3.allapps.AlphabeticalAppsList;
|
||||
import com.android.launcher3.allapps.BaseAdapterProvider;
|
||||
import com.android.launcher3.allapps.BaseAllAppsAdapter;
|
||||
import com.android.launcher3.allapps.BaseAllAppsContainerView;
|
||||
import com.android.launcher3.allapps.search.SearchAdapterProvider;
|
||||
|
||||
@@ -79,4 +82,11 @@ public class TaskbarAllAppsContainerView extends BaseAllAppsContainerView<Taskba
|
||||
setInsets(insets.getInsets(WindowInsets.Type.systemBars()).toRect());
|
||||
return super.onApplyWindowInsets(insets);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseAllAppsAdapter getAdapter(AlphabeticalAppsList<TaskbarAllAppsContext> mAppsList,
|
||||
BaseAdapterProvider[] adapterProviders) {
|
||||
return new AllAppsGridAdapter<>(mActivityContext, getLayoutInflater(), mAppsList,
|
||||
adapterProviders);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user