當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。