use of com.android.gallery3d.ui.ActionModeHandler in project android_packages_apps_Gallery2 by LineageOS.
the class AlbumSetPage method initializeViews.
private void initializeViews() {
mSelectionManager = new SelectionManager(mActivity, true);
mSelectionManager.setSelectionListener(this);
mConfig = Config.AlbumSetPage.get(mActivity);
mSlotView = new SlotView(mActivity, mConfig.slotViewSpec);
mAlbumSetView = new AlbumSetSlotRenderer(mActivity, mSelectionManager, mSlotView, mConfig.labelSpec, mConfig.placeholderColor);
mSlotView.setSlotRenderer(mAlbumSetView);
mSlotView.setListener(new SlotView.SimpleListener() {
@Override
public void onDown(int index) {
AlbumSetPage.this.onDown(index);
}
@Override
public void onUp(boolean followedByLongPress) {
AlbumSetPage.this.onUp(followedByLongPress);
}
@Override
public void onSingleTapUp(int slotIndex) {
AlbumSetPage.this.onSingleTapUp(slotIndex);
}
@Override
public void onLongTap(int slotIndex) {
AlbumSetPage.this.onLongTap(slotIndex);
}
});
mActionModeHandler = new ActionModeHandler(mActivity, mSelectionManager);
mActionModeHandler.setActionModeListener(new ActionModeListener() {
@Override
public boolean onActionItemClicked(MenuItem item) {
return onItemSelected(item);
}
});
mRootPane.addComponent(mSlotView);
}
use of com.android.gallery3d.ui.ActionModeHandler 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);
}
});
}
use of com.android.gallery3d.ui.ActionModeHandler in project android_packages_apps_Gallery2 by LineageOS.
the class AlbumPage method initializeViews.
private void initializeViews() {
mSelectionManager = new SelectionManager(mActivity, false);
mSelectionManager.setSelectionListener(this);
mConfig = Config.AlbumPage.get(mActivity);
mConfigList = Config.AlbumPageList.get(mActivity);
if (mViewType) {
mSlotView = new SlotView(mActivity, mConfig.slotViewSpec);
mAlbumView = new AlbumSlotRenderer(mActivity, mSlotView, mConfig.labelSpec, mSelectionManager, mConfig.placeholderColor, mViewType);
} else {
mSlotView = new SlotView(mActivity, mConfigList.slotViewSpec);
mAlbumView = new AlbumSlotRenderer(mActivity, mSlotView, mConfigList.labelSpec, mSelectionManager, mConfig.placeholderColor, mViewType);
}
mSlotView.setSlotRenderer(mAlbumView);
mRootPane.addComponent(mSlotView);
mSlotView.setListener(new SlotView.SimpleListener() {
@Override
public void onDown(int index) {
AlbumPage.this.onDown(index);
}
@Override
public void onUp(boolean followedByLongPress) {
AlbumPage.this.onUp(followedByLongPress);
}
@Override
public void onSingleTapUp(int slotIndex) {
AlbumPage.this.onSingleTapUp(slotIndex);
}
@Override
public void onLongTap(int slotIndex) {
AlbumPage.this.onLongTap(slotIndex);
}
});
mActionModeHandler = new ActionModeHandler(mActivity, mSelectionManager);
mActionModeHandler.setActionModeListener(new ActionModeListener() {
@Override
public boolean onActionItemClicked(MenuItem item) {
return onItemSelected(item);
}
});
}
Aggregations