Workspace.java 文件源码

java
阅读 100 收藏 0 点赞 0 评论 0

项目:SimpleUILauncher 作者:
/**
 * Used to inflate the Workspace from XML.
 *
 * @param context The application's context.
 * @param attrs The attributes set containing the Workspace's customization values.
 * @param defStyle Unused.
 */
public Workspace(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);

    mLauncher = Launcher.getLauncher(context);
    mStateTransitionAnimation = new WorkspaceStateTransitionAnimation(mLauncher, this);
    final Resources res = getResources();
    DeviceProfile grid = mLauncher.getDeviceProfile();
    mWorkspaceFadeInAdjacentScreens = grid.shouldFadeAdjacentWorkspaceScreens();
    mWallpaperManager = WallpaperManager.getInstance(context);

    mWallpaperOffset = new WallpaperOffsetInterpolator(this);
    mOverviewModeShrinkFactor =
            res.getInteger(R.integer.config_workspaceOverviewShrinkPercentage) / 100f;

    setOnHierarchyChangeListener(this);
    setHapticFeedbackEnabled(false);

    initWorkspace();

    // Disable multitouch across the workspace/all apps/customize tray
    setMotionEventSplittingEnabled(true);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号