分享好友 最新动态首页 最新动态分类 切换频道
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)
最新文章
讲师课件教学课件
讲师课件目录讲师介绍课程内容教学方法教学资源教学评价教师风采展示CONTENTS01讲师介绍CHAPTER拥有国内外知名大学的博士学位,并在相关领域有多年的研究经验。学术背景研究方向学术成果专注于某一专业领域,对该领域有深入的理解和独到的
解锁手机正确使用方法,vivo一键证件照功能太好用了!
  随着时间的推移,这个不平凡的假期也正式画下了句点。莘莘学子纷纷随着开学季的到来回到了校园。但是假期一长,突然的返校就让许多学子们手足无措了起来。如何快速适应校园生活,也成为了当下诸多学生头痛的问题之一。当然了,vivo这家
错误编译如何解决apktool d -d 出现错误Error occured while disassembling class
新手发帖,很多方面都是刚入门,有错误的地方请大家见谅,欢迎批评指正如何处理apktool d -d 出现错误Error occured while disassembling class告诉你,这不是你的错误,这是apktool本身的错误,现在正式release的1.5.2版本不行,搞不定这
(二十六)文件上传和下载
目录实现web开发中的文件上传功能,需要完成如下二步操作:在web页面中添加上传输入项在servlet中读取上传文件的数据,并保存到本地硬盘中如何在web页面中添加上传输入项标签用于在web页面中添加上传输入项,设置文件上传输入项的时需要注
连锁店销售管理系统_连锁店销售管理系统百科
1、本网站发布的该篇文章,目的在于分享电商知识及传递、交流相关电商信息,以便您学习或了解电商知识,请您不要用于其他用途; 2、该篇文章中所涉及的商标、标识的商品/服务并非来源于本网站,更非本网站提供,与本网站无关,系他人的商品
神马搜索广告投放是怎么收费的 uc信息流推广怎么样模式收费
在快应用开发中整合神马搜索的广告通常需要通过其官方提供的SDK来进行。首先,你需要在项目中引入神马搜索的广告SDK,并按照官方文档注册开发者账号并获取广告位ID。以下是基本步骤:1. **添加依赖**: - 在`build.gradle`文件的`dependenc
德尔未来12月12日获融资买入1824.18万元,融资余额1.64亿元
12月12日,涨2.50%,成交额1.65亿元。两融数据显示,当日德尔未来获融资买入额1824.18万元,融资偿还2225.46万元,融资净买入-401.29万元。截至12月12日,德尔未来融资融券余额合计1.64亿元。融资方面,德尔未来当日融资买入1824.18万元。
梦幻西游:全服第一强盗货真价实,神豪砸重金打浮云神马,神宠!
强盗这个类型的宝宝,我们应该在做任务的时候很少见到。自然也比较少看到有人去炼妖这个,但是这只9技能的宝宝,那真的是突破了人们的想象,不单单是技能好,还打了浮云神马。TOP1:不值钱的超级简易这个80级的手镯,在打造出来的时候,号
相关文章
推荐文章
发表评论
0评