コード例 #1
0
ファイル: EventMod.java プロジェクト: ladams14640/MiWatch-1
  private void initPositions() {
    // we always animate to this position, might as well save it.
    // TODO shouldnt be capitalized.
    X_ORIGINAL_POSITION = mContext.getWallpaperDesiredMinimumWidth() / 10;
    Y_ORIGINAL_POSITION = (int) mHudView.getTopOfHud() + 25;

    // set width
    width = mContext.getWallpaperDesiredMinimumWidth() - 50;
    RECT_LENGTH = X_ORIGINAL_POSITION + width;
    RECT_WIDTH = Y_ORIGINAL_POSITION + height;
    locationRect = new Rect(X_ORIGINAL_POSITION, Y_ORIGINAL_POSITION, RECT_LENGTH, RECT_WIDTH);
    xText = X_ORIGINAL_POSITION;

    // set threshold
    EVENT_BACKWARD_THRESHOLD = (int) (mContext.getWallpaperDesiredMinimumWidth() * .1); // 1/20
  }