Search in sources :

Example 1 with ManageCacheDrawer

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();
}
Also used : ManageCacheDrawer(com.android.gallery3d.ui.ManageCacheDrawer) SelectionManager(com.android.gallery3d.ui.SelectionManager) SlotView(com.android.gallery3d.ui.SlotView) Activity(android.app.Activity)

Aggregations

Activity (android.app.Activity)1 ManageCacheDrawer (com.android.gallery3d.ui.ManageCacheDrawer)1 SelectionManager (com.android.gallery3d.ui.SelectionManager)1 SlotView (com.android.gallery3d.ui.SlotView)1