分享好友 最新动态首页 最新动态分类 切换频道
Android4.0Launcher2可导入eclipse中直接运行资源
2024-12-26 20:33
package com.android.launcher2; import android.animation.Animator; import android.animation.Animator.AnimatorListener; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.app.AlertDialog; import android.app.WallpaperManager; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProviderInfo; import android.content.ClipData; import android.content.ClipDescription; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Camera; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Point; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Region.Op; import android.graphics.drawable.Drawable; import android.os.IBinder; import android.os.Parcelable; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.Log; import android.util.Pair; import android.view.Display; import android.view.DragEvent; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.animation.DecelerateInterpolator; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.android.launcher.R; import com.android.launcher2.FolderIcon.FolderRingAnimator; import com.android.launcher2.InstallWidgetReceiver.WidgetMimeTypeHandlerData; import java.util.ArrayList; import java.util.HashSet; import java.util.List; public class Workspace extends SmoothPagedView implements DropTarget, DragSource, DragScroller, View.OnTouchListener, DragController.DragListener { @SuppressWarnings({"UnusedDeclaration"}) private static final String TAG = "Launcher.Workspace"; // Y rotation to apply to the workspace screens private static final float WORKSPACE_ROTATION = 12.5f; private static final float WORKSPACE_OVERSCROLL_ROTATION = 24f; private static float CAMERA_DISTANCE = 6500; private static final int CHILDREN_OUTLINE_FADE_OUT_DELAY = 0; private static final int CHILDREN_OUTLINE_FADE_OUT_DURATION = 375; private static final int CHILDREN_OUTLINE_FADE_IN_DURATION = 100; private static final int BACKGROUND_FADE_OUT_DURATION = 350; private static final int ADJACENT_SCREEN_DROP_DURATION = 300; // These animators are used to fade the children's outlines private ObjectAnimator mChildrenOutlineFadeInAnimation; private ObjectAnimator mChildrenOutlineFadeOutAnimation; private float mChildrenOutlineAlpha = 0; // These properties refer to the background protection gradient used for AllApps and Customize private ValueAnimator mBackgroundFadeInAnimation; private ValueAnimator mBackgroundFadeOutAnimation; private Drawable mBackground; boolean mDrawBackground = true; private float mBackgroundAlpha = 0; private float mOverScrollMaxBackgroundAlpha = 0.0f; private int mOverScrollPageIndex = -1; private AnimatorSet mDividerAnimator; private float mWallpaperScrollRatio = 1.0f; private final WallpaperManager mWallpaperManager; private IBinder mWindowToken; private static final float WALLPAPER_SCREENS_SPAN = 2f; private int mDefaultPage; private CellLayout.CellInfo mDragInfo; private int[] mTargetCell = new int[2]; private CellLayout mDragTargetLayout = null; private Launcher mLauncher; private IconCache mIconCache; private DragController mDragController; // These are temporary variables to prevent having to allocate a new object just to // return an (x, y) value from helper functions. Do NOT use them to maintain other state. private int[] mTempCell = new int[2]; private int[] mTempEstimate = new int[2]; private float[] mDragViewVisualCenter = new float[2]; private float[] mTempDragCoordinates = new float[2]; private float[] mTempCellLayoutCenterCoordinates = new float[2]; private float[] mTempDragBottomRightCoordinates = new float[2]; private Matrix mTempInverseMatrix = new Matrix(); private SpringLoadedDragController mSpringLoadedDragController; private float mSpringLoadedShrinkFactor; private static final int DEFAULT_CELL_COUNT_X = 4; private static final int DEFAULT_CELL_COUNT_Y = 4; // State variable that indicates whether the pages are small (ie when you're // in all apps or customize mode) enum State { NORMAL, SPRING_LOADED, SMALL }; private State mState = State.NORMAL; private boolean mIsSwitchingState = false; private boolean mSwitchStateAfterFirstLayout = false; private State mStateAfterFirstLayout; private AnimatorSet mAnimator; private AnimatorListener mChangeStateAnimationListener; boolean mAnimatingViewIntoPlace = false; boolean mIsDragOccuring = false; boolean mChildrenLayersEnabled = true; private boolean mInScrollArea = false; private final HolographicOutlineHelper mOutlineHelper = new HolographicOutlineHelper(); private Bitmap mDragOutline = null; private final Rect mTempRect = new Rect(); private final int[] mTempXY = new int[2]; private int mDragViewMultiplyColor; // Paint used to draw external drop outline private final Paint mExternalDragOutlinePaint = new Paint(); // Camera and Matrix used to determine the final position of a neighboring CellLayout private final Matrix mMatrix = new Matrix(); private final Camera mCamera = new Camera(); private final float mTempFloat2[] = new float[2]; enum WallpaperVerticalOffset { TOP, MIDDLE, BOTTOM }; int mWallpaperWidth; int mWallpaperHeight; WallpaperOffsetInterpolator mWallpaperOffset; boolean mUpdateWallpaperOffsetImmediately = false; private Runnable mDelayedResizeRunnable; private int mDisplayWidth; private int mDisplayHeight; private boolean mIsStaticWallpaper; private int mWallpaperTravelWidth; // Variables relating to the creation of user folders by hovering shortcuts over shortcuts private static final int FOLDER_CREATION_TIMEOUT = 250; private final Alarm mFolderCreationAlarm = new Alarm(); private FolderRingAnimator mDragFolderRingAnimator = null; private View mLastDragOverView = null; private boolean mCreateUserFolderOnDrop = false; // Variables relating to touch disambiguation (scrolling workspace vs. scrolling a widget)
最新文章
长合汽车金融全国24小时人工客服电话
长合汽车金融全国24小时人工客服电话00861-82913-38043二线00861-52030-84830长合汽车金融:推动汽车产业与金融服务的深度融合随着汽车产业的飞速发展,汽车金融作为连接汽车产业与金融服务的桥梁,正逐渐成为推动汽车市场繁荣的重要力量,
表白小作文写作生成器:让爱意表达不再难,轻松俘获TA的心
新用户专享:「香港/美国云服务器」新购6折 低至9元/月!点击查看活动介绍>>>不善言辞者往往难以直接流露心绪。写一封真挚的表白信能传达内心情感,但写作起来却颇为不易。如今,表白信写作生成器的问世,为那些有表白需求的人带来了极大的
轻松获取小红书海量数据:爬虫软件介绍
小红书作为国内最具人气的电商社交平台之一,其流量价值不言而喻。然而,由于平台对内容的高度审查以及个人账号的限制,想要在小红书上实现商业变现并不容易。而一款优秀的小红书爬虫采集软件,可以帮助你轻松获取平台上的海量数据,并提供
神马搜索推广竞价排名中的关键词后期优化思路分享
神马搜索,这款专为移动设备打造的搜索引擎,一直致力于为移动用户提供快速、准确、有用的搜索体验。在神马搜索推广过程中,关键词的选择与优化是提高广告效果的关键环节。本文将详细介绍在优化过程中需要关注的一些方面。首先,我们需要密
详细分析搜狗SEO推送,掌握关键步骤,提升网站流量
随着互联网的快速发展,搜索引擎(SEO)已经成为企业提升流量、增强品牌影响力的关键手段。在我国,搜狗作为一款备受欢迎的搜索引擎,其SEO推送功能备受关注。本文将深入剖析搜狗SEO推送,帮助广大网民和网站管理员掌握关键策略,提升网站
闲鱼买卖二手物品防骗攻略探讨
创作立场声明:闲鱼骗子太多了。我们能不能把骗子资料汇总起来,同一城市超多同一事件的,应该就是一个人不同的小号,金额巨大就可以请警察参与了吧?进入闲鱼已经好多年。一不小心居然买到69件,卖出111件。从最初战战兢兢只接受当面交易
自动提交百度收录插件
问题描述在wordpress后台手动发布文章,插件可以工作的很好,没有问题。但是如果用wordpress的 restapi 发布文章之后,插件提交的百度的文章链接是错误的。我已经确定文章的分类是正确的,因为我在后台打开文章,发现文章的分类设置是正确
置顶怎么建设小程序的后台比较好?|零基础探索指南精选热门
一、写在前面我比较喜欢做微信生态的解决方案,给企业或个人提供一些技术方案和应用形态选型的咨询。最近跟一些朋友聊天,他们在各自的工作岗位中,随着工作熟悉就会自然而然有很多能提升工作效率的点子。有些人喜欢用文档、问卷、表单等SA
英文搜索成各家搜索引擎标配 百度360搜狗哪家强?
360搜索:在首页(so.com)首页中就可找到入口,点击“英文”标签,在搜索框中输入关键词,即可得到想要的结果。 搜狗:在首页(sogou.com)“更多”按钮中点击“英文”获得英文搜索入口,同时也和百度一样,在网页搜索中提示英文结果。 结
用AI设计越多,越感觉自己菜……
很多人在刚接触学习平面设计的时候,都会有一种“为什么别人随手一划拉就能让画面变顺眼好看,自己排半天还是太丑想放弃”的挫败感。特别是现在AI设计越来越广泛,越来越感觉自己“太菜了”。向大佬咨询也常会得到一些类似“格式塔理论”“
相关文章
推荐文章
发表评论
0评