mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Revert "Extract out common adapter logic to support different Al..."
Revert "Fixing AdapterItem import" Revert submission 17044827-tm-dev-216150568 Reason for revert: Broke builds Bug: 223609269 Reverted Changes: I53eba3c8c:Fixing AdapterItem import I1068e75d0:Extract out common adapter logic to support differ... I24d8e54e8:Fix AdapterItem imports Change-Id: I931c666db7dcb2c8eef1894b56b59ed688218def
This commit is contained in:
@@ -44,6 +44,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
@@ -696,21 +697,18 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte
|
||||
return ColorUtils.blendARGB(mScrimColor, mHeaderProtectionColor, blendRatio);
|
||||
}
|
||||
|
||||
protected abstract BaseAllAppsAdapter getAdapter(AlphabeticalAppsList<T> mAppsList,
|
||||
BaseAdapterProvider[] adapterProviders);
|
||||
|
||||
protected int getHeaderBottom() {
|
||||
return (int) getTranslationY();
|
||||
}
|
||||
|
||||
/** Holds a {@link BaseAllAppsAdapter} and related fields. */
|
||||
/** Holds a {@link AllAppsGridAdapter} and related fields. */
|
||||
public class AdapterHolder {
|
||||
public static final int MAIN = 0;
|
||||
public static final int WORK = 1;
|
||||
|
||||
private final boolean mIsWork;
|
||||
public final BaseAllAppsAdapter<T> adapter;
|
||||
final RecyclerView.LayoutManager mLayoutManager;
|
||||
public final AllAppsGridAdapter<T> adapter;
|
||||
final LinearLayoutManager mLayoutManager;
|
||||
final AlphabeticalAppsList<T> mAppsList;
|
||||
final Rect mPadding = new Rect();
|
||||
AllAppsRecyclerView mRecyclerView;
|
||||
@@ -726,7 +724,8 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte
|
||||
mWorkManager.getAdapterProvider()}
|
||||
: new BaseAdapterProvider[]{mMainAdapterProvider};
|
||||
|
||||
adapter = getAdapter(mAppsList, adapterProviders);
|
||||
adapter = new AllAppsGridAdapter<>(mActivityContext, getLayoutInflater(), mAppsList,
|
||||
adapterProviders);
|
||||
mAppsList.setAdapter(adapter);
|
||||
mLayoutManager = adapter.getLayoutManager();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user