本文整理匯總了Java中org.chromium.chrome.browser.compositor.layouts.eventfilter.EdgeSwipeEventFilter類的典型用法代碼示例。如果您正苦於以下問題:Java EdgeSwipeEventFilter類的具體用法?Java EdgeSwipeEventFilter怎麽用?Java EdgeSwipeEventFilter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
EdgeSwipeEventFilter類屬於org.chromium.chrome.browser.compositor.layouts.eventfilter包,在下文中一共展示了EdgeSwipeEventFilter類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: LayoutManagerDocument
import org.chromium.chrome.browser.compositor.layouts.eventfilter.EdgeSwipeEventFilter; //導入依賴的package包/類
/**
* Creates a {@link LayoutManagerDocument} instance.
* @param host A {@link LayoutManagerHost} instance.
*/
public LayoutManagerDocument(LayoutManagerHost host) {
super(host);
mContext = host.getContext();
LayoutRenderHost renderHost = host.getLayoutRenderHost();
mToolbarOverlay = new ToolbarSceneLayer(mContext, this, renderHost);
// Build Event Filter Handlers
mGestureHandler = new GestureHandlerLayoutDelegate(this);
mToolbarSwipeHandler = new ToolbarSwipeHandler(this);
// Build Event Filters
mStaticEdgeEventFilter =
new EdgeSwipeEventFilter(mContext, this, new StaticEdgeSwipeHandler());
mOverlayPanelManager = new OverlayPanelManager();
// Build Layouts
mStaticLayout = new StaticLayout(
mContext, this, renderHost, mStaticEdgeEventFilter, mOverlayPanelManager);
// Contextual Search scene overlay.
mContextualSearchPanel =
new ContextualSearchPanel(mContext, this, this, mOverlayPanelManager);
// Reader Mode scene overlay.
mReaderModePanel = new ReaderModePanel(mContext, this, this, mOverlayPanelManager, this);
// Set up layout parameters
mStaticLayout.setLayoutHandlesTabLifecycles(true);
setNextLayout(null);
}
示例2: LayoutManagerDocument
import org.chromium.chrome.browser.compositor.layouts.eventfilter.EdgeSwipeEventFilter; //導入依賴的package包/類
/**
* Creates a {@link LayoutManagerDocument} instance.
* @param host A {@link LayoutManagerHost} instance.
*/
public LayoutManagerDocument(LayoutManagerHost host) {
super(host);
Context context = host.getContext();
LayoutRenderHost renderHost = host.getLayoutRenderHost();
mContextualSearchPanel = new ContextualSearchPanel(context, this);
mReaderModePanelSelector = new ReaderModePanelSelector() {
@Override
public ReaderModePanel getActiveReaderModePanel() {
if (mStaticLayout == null || !mStaticLayout.isActive()) return null;
ReaderModePanel panel = mStaticLayout.getReaderModePanel();
if (panel == null) return null;
if (!panel.isShowing() || !panel.isReaderModeCurrentlyAllowed()) return null;
return panel;
}
};
// Build Event Filter Handlers
mContextualSearchEdgeSwipeHandler = new ContextualSearchEdgeSwipeHandler(this);
mReaderModeEdgeSwipeHandler = new ReaderModeEdgeSwipeHandler(
mReaderModePanelSelector, this);
mGestureHandler = new GestureHandlerLayoutDelegate(this);
mToolbarSwipeHandler = new ToolbarSwipeHandler(this);
// Build Event Filters
mStaticEdgeEventFilter =
new EdgeSwipeEventFilter(context, this, new StaticEdgeSwipeHandler());
mContextualSearchEventFilter = new ContextualSearchEventFilter(
context, this, mGestureHandler, mContextualSearchPanel);
EventFilter contextualSearchStaticEventFilter = new ContextualSearchStaticEventFilter(
context, this, mContextualSearchPanel, mContextualSearchEdgeSwipeHandler, this);
EventFilter readerModeStaticEventFilter = new ReaderModeStaticEventFilter(
context, this, mReaderModePanelSelector, mReaderModeEdgeSwipeHandler, this);
EventFilter staticCascadeEventFilter = new CascadeEventFilter(context, this,
new EventFilter[] {readerModeStaticEventFilter, contextualSearchStaticEventFilter,
mStaticEdgeEventFilter});
// Build Layouts
mStaticLayout = new StaticLayout(
context, this, renderHost, staticCascadeEventFilter, mContextualSearchPanel);
mContextualSearchLayout = new ContextualSearchLayout(
context, this, renderHost, mContextualSearchEventFilter, mContextualSearchPanel);
// Set up layout parameters
mStaticLayout.setLayoutHandlesTabLifecycles(true);
setNextLayout(null);
}