- 浏览: 130833 次
- 性别:
- 来自: 武汉
最新评论
-
酱油党:
你这个方法只能截当前activity,想要截取任意地方,怎么办 ...
全屏截图 -
月下独酌:
sxchao2008 写道/sdcard/cacerts.bk ...
android https之二 -
sxchao2008:
/sdcard/cacerts.bks 这个证书可以到网上随便 ...
android https之二 -
月下独酌:
Rhamiss 写道请问这是从sdcard安装ca证书的源代码 ...
android https之三 -
月下独酌:
Rhamiss 写道请问这是从sdcard安装ca证书的源代码 ...
android https之三
文章列表
//workspace
void snapToScreen(int whichScreen) {
// if (!mScroller.isFinished()) return;
clearVacantCache();
enableChildrenCache();
whichScreen = Math.max(0, Math.min(whichScreen, getChildCount() - 1));
int index = indexOfScreen(mCurrentGroup, mCurrentScre ...
private void drawRightDragImg(Canvas canvas) {
int offset = getDragWingsOffset();
Drawable rightDragNormal = getResources().getDrawable(R.drawable.right_drag_normal);
Drawable rightDrag = getResources().getDrawable(R.drawable.right_drag);
Bitmap arrowheadRightNormal ...
private void drawWingsImg(Canvas canvas) {
if (workspace.isScrollerFinished()) {
if (mDragging) {
if (transferAt == null) {
startWingsAnimation(WINGS_START_VECTOR, WINGS_END_VECTOR, WINGS_INCREMENT, WINGS_SLEEP_TIME);
}
...
private void drawCanUseSpace(Canvas canvas) {
try {
if (cellPosition != null && cellPosition.length >= 2 && workspace.isScrollerFinished()) {
CellLayout current = (CellLayout) workspace.getCurrentCellLayout();
if (current != null ...
public void setWorkspace(Workspace workspace) {
this.workspace = workspace;
}
public void setGroupNavi(GroupNavigation groupNavi) {
this.groupNavi = groupNavi;
}
public static boolean isDragging() {
return dragging;
}
public void doWingsAnimation() { ...
@Override
public boolean onTouchEvent(MotionEvent ev) {
case MotionEvent.ACTION_MOVE:
mNavigator.setDrawToVisible(true);
final int scrollX = mScrollX;
final int scrollY = mScrollY;
final float touchX = mTouchOffsetX;
f ...
@Override
protected void dispatchDraw(Canvas canvas) {
super.dispatchDraw(canvas);
if (mDragging && mDragBitmap != null) {
if (mAnimationState == ANIMATION_STATE_STARTING) {
mAnimationStartTime = SystemClock.uptimeMillis();
...
//draglayer
import static com.android.launcher.LengthCalculate.GREEN_RECT_TOP_OFFSET;
import android.graphics.BitmapFactory;
import android.graphics.drawable.Drawable;
import com.android.launcher.CellLayout.CellInfo;
private static final int SCROLL_ZONE_IMG_WIDTH = 35;
private static fin ...
public void finishZoomOutAnimation() {
if (at != null) {
if (at.isAlive()) {
dragZoomOutAnimation = true;
at.setEndScale(INIT_REDUCE_FINAL_VALUE);
at.setSleepTime(FINISH_ZOOM_OUT_SLEEP_TIME);
at.setAnimationS ...
if (at.isAlive()) {
if (!dragZoomOutAnimation) {
at.setAnimationState(AnimationThread.STATE_ZOOM_OUT);
}
} else if (!at.isNormalOver()) {
startAnimation(getScaleValue(matrix), REDUCE_FINA ...
//celllayout
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.drawable.Drawable;
public static final float INIT_REDUCE_FINAL_VALUE = 0.6f;
public static final float REDUCE_FINAL_VALUE = 0.9f;
public static final float BLOWUP_FINAL_VALUE = 1.0f;
...
import android.view.View;
public class LengthCalculate {
public static final int STATEBAR_HEIGHT = 53;
public static final int GREEN_RECT_TOP_OFFSET = 5;
public static final int GROUP_NAVIGATION_OFFSET = 2;
private static final int DRAG_WINGS_HEIGHT = 300;
...
import android.util.Log;
import android.view.View;
public class AnimationThread extends Thread {
private static final String TAG = AnimationThread.class.getSimpleName();
public static final long DEFAULT_SLEEP_TIME = 25;
public static final long DEFAULT_INCREMENT = 1;
public ...
private void setUnlocked()
{
Window win = getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
winParams.flags |= (WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
...