use of com.android.gallery3d.ui.TimeLineSlotRenderer in project android_packages_apps_Gallery2 by LineageOS.
the class TimeLinePage method initializeViews.
private void initializeViews() {
mSelectionManager = new SelectionManager(mActivity, false);
mSelectionManager.setSelectionListener(this);
Config.TimeLinePage config = Config.TimeLinePage.get(mActivity);
mSlotView = new TimeLineSlotView(mActivity, config.slotViewSpec);
mAlbumView = new TimeLineSlotRenderer(mActivity, mSlotView, mSelectionManager, config.labelSpec, config.placeholderColor);
mSlotView.setSlotRenderer(mAlbumView);
mRootPane.addComponent(mSlotView);
mSlotView.setListener(new TimeLineSlotView.SimpleListener() {
@Override
public void onDown(int index) {
TimeLinePage.this.onDown(index);
}
@Override
public void onUp(boolean followedByLongPress) {
TimeLinePage.this.onUp(followedByLongPress);
}
@Override
public void onSingleTapUp(int slotIndex, boolean isTitle) {
TimeLinePage.this.onSingleTapUp(slotIndex, isTitle);
}
@Override
public void onLongTap(int slotIndex, boolean isTitle) {
TimeLinePage.this.onLongTap(slotIndex, isTitle);
}
});
mActionModeHandler = new ActionModeHandler(mActivity, mSelectionManager);
mActionModeHandler.setActionModeListener(new ActionModeListener() {
@Override
public boolean onActionItemClicked(MenuItem item) {
return onItemSelected(item);
}
});
}
Aggregations