android L1 版本Launcher桌面循環滑動

每個版本的Launcher都有很大的變動,經過測試5.1的launcher可以完美在6.0環境運行 遇到這個需要桌面循環滑動的需求 我就又開始偷懶了 廢話不多說 直接上代碼 具體過程就不分析了 直接在這裏解決問題

路徑Launcher3\src\com\android\launcher3\Workspace.java
    */
    public Workspace(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        mContentIsRefreshable = false;

        /// M: Whether support Cycle Sliding or not.
        //mSupportCycleSliding = LauncherExtPlugin.getInstance().getWorkspaceExt(context)
                //.supportAppListCycleSliding();

                mSupportCycleSliding =true;
        mOutlineHelper = HolographicOutlineHelper.obtain(context);

        mDragEnforcer = new DropTarget.DragEnforcer(context);
        // With workspace, data is available straight from the get-go
        setDataIsReady();
   /**
     * M: Support cycle sliding screen or not.
     * @return true: support cycle sliding screen.
     */
    @Override
    public boolean isSupportCycleSlidingScreen() {
        return mSupportCycleSliding;
    }

    /**
     * M: Support cycle sliding screen or not.
     */
    private boolean mSupportCycleSliding = false;//false改成true
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章