use of com.android.gallery3d.ui.ManageCacheDrawer in project android_packages_apps_Gallery2 by LineageOS.
the class ManageCachePage method initializeViews.
private void initializeViews() {
Activity activity = mActivity;
mSelectionManager = new SelectionManager(mActivity, true);
mSelectionManager.setSelectionListener(this);
Config.ManageCachePage config = Config.ManageCachePage.get(activity);
mSlotView = new SlotView(mActivity, config.slotViewSpec);
mSelectionDrawer = new ManageCacheDrawer(mActivity, mSelectionManager, mSlotView, config.labelSpec, config.cachePinSize, config.cachePinMargin);
mSlotView.setSlotRenderer(mSelectionDrawer);
mSlotView.setListener(new SlotView.SimpleListener() {
@Override
public void onDown(int index) {
ManageCachePage.this.onDown(index);
}
@Override
public void onUp(boolean followedByLongPress) {
ManageCachePage.this.onUp();
}
@Override
public void onSingleTapUp(int slotIndex) {
ManageCachePage.this.onSingleTapUp(slotIndex);
}
});
mRootPane.addComponent(mSlotView);
initializeFooterViews();
}
Aggregations