您的位置:首页 > 移动开发 > Android开发

android L1 版本Launcher桌面循环滑动

2017-04-22 09:39 288 查看

每个版本的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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  launcher