@Override
  protected void onSizeChanged(int w, int h, int oldw, int oldh) {
    super.onSizeChanged(w, h, oldw, oldh);

    Log.e(TAG, "onSizeChanged");
    CircleImageView.this.setup();
  }
Ejemplo n.º 2
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   if (w > 0 && h > 0) {
     loadImage();
   }
 }
Ejemplo n.º 3
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   mBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
   mCanvas = new Canvas(mBitmap);
   imageOriginal = ((BitmapDrawable) getDrawable()).getBitmap();
 }
Ejemplo n.º 4
0
  @Override
  protected void onSizeChanged(int w, int h, int oldw, int oldh) {
    super.onSizeChanged(w, h, oldw, oldh);
    System.out.println("onSizeChanged->hree");
    if (animation == null) {
      animation = new Rotate3dAnimation(0, 360, w / 2, h / 2, 1, true);
      animation.setDuration(1000);
      animation.setFillAfter(true);
      animationSet = new AnimationSet(true);
      animationSet.addAnimation(animation);

      // animation=new Rotate3dAnimation(360, 0, w/2, h/2, 0, true);
      // animation.setDuration(3000);
      // animation.setFillAfter(true);
      // animationSet.addAnimation(animation);
      //
      width = h;

      animation.setAnimationListener(
          new AnimationListener() {

            @Override
            public void onAnimationStart(Animation animation) {}

            @Override
            public void onAnimationRepeat(Animation animation) {}

            @Override
            public void onAnimationEnd(Animation animation) {
              startTrans();
            }
          });
    }
  }
Ejemplo n.º 5
0
  /*
   * We need this to get the dimensions of the view. Once we get those, We can scale the image to make sure it's proper,
   * Initialize the matrix and align it with the views center.
   */
  @Override
  protected void onSizeChanged(int w, int h, int oldw, int oldh) {
    super.onSizeChanged(w, h, oldw, oldh);

    // method called multiple times but we can initialize just once
    if (wheelHeight == 0 || wheelWidth == 0) {
      wheelHeight = h;
      wheelWidth = w;
      // resize the image
      Matrix resize = new Matrix();
      resize.postScale(
          (float) Math.min(wheelWidth, wheelHeight) / (float) imageOriginal.getWidth(),
          (float) Math.min(wheelWidth, wheelHeight) / (float) imageOriginal.getHeight());
      imageScaled =
          Bitmap.createBitmap(
              imageOriginal,
              0,
              0,
              imageOriginal.getWidth(),
              imageOriginal.getHeight(),
              resize,
              false);
      // translate the matrix to the image view's center
      float translateX = wheelWidth / 2 - imageScaled.getWidth() / 2;
      float translateY = wheelHeight / 2 - imageScaled.getHeight() / 2;
      matrix.postTranslate(translateX, translateY);
      WheelMenu.this.setImageBitmap(imageScaled);
      WheelMenu.this.setImageMatrix(matrix);
    }
  }
Ejemplo n.º 6
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   mHeight = getHeight() - getPaddingTop() - getPaddingBottom();
   mWidth = getWidth() - getPaddingLeft() - getPaddingRight();
   mX = getX();
   mY = getY();
 }
Ejemplo n.º 7
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   if (foreground != null) {
     foreground.setBounds(0, 0, w, h);
     invalidate();
   }
 }
Ejemplo n.º 8
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   centerX = w / 2;
   centerY = h / 2;
   outerRadius = Math.min(w, h) / 2;
   pressedRingRadius = outerRadius - pressedRingWidth - pressedRingWidth / 2;
 }
Ejemplo n.º 9
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   Log.d("MandelbrotView", "onSizeChanged begin...");
   Log.d("MandelbrotView", "Size: " + w + "x" + h);
   super.onSizeChanged(w, h, oldw, oldh);
   stop();
   rescale(w, h);
   start();
   Log.d("MandelbrotView", "onSizeChanged end...");
 }
  @Override
  protected void onSizeChanged(int w, int h, int oldw, int oldh) {
    super.onSizeChanged(w, h, oldw, oldh);
    if (w != oldw || h != oldh) {
      int cx = (w - getDrawable().getIntrinsicWidth()) / 2;
      int cy = (h - getDrawable().getIntrinsicHeight()) / 2;
      mImageMatrix.setTranslate(cx, cy);
      setImageMatrix(mImageMatrix);

      mCenterX = w / 2;
      mCenterY = h / 2;
    }
  }
Ejemplo n.º 11
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   setup();
 }
Ejemplo n.º 12
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   isInited = true;
   initImage();
 }
 @Override
 protected void onSizeChanged(final int w, final int h, final int oldw, final int oldh) {
   super.onSizeChanged(w, w, oldw, oldh);
 }
Ejemplo n.º 14
0
 @Override
 protected void onSizeChanged(int nw, int nh, int ow, int oh) {
   super.onSizeChanged(nw, nh, ow, oh);
 }