当前位置: 首页>>代码示例>>Java>>正文


Java EdgeSwipeEventFilter类代码示例

本文整理汇总了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);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:38,代码来源:LayoutManagerDocument.java

示例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);
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:54,代码来源:LayoutManagerDocument.java


注:本文中的org.chromium.chrome.browser.compositor.layouts.eventfilter.EdgeSwipeEventFilter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。