Matrix equals - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Matrix equals method.

This code example shows how to use the following methods:equals, mapRect, postConcat, set
                matrix = null;
            } 
         
            // don't invalidate unless we're actually changing our matrix 
            if (matrix == null && !super.getImageMatrix().isIdentity() ||
                    matrix != null && !super.getImageMatrix().equals(matrix)) {
//ALPS00126955 BEGIN 
                //when we invalidate,call super.setImageMatrix(),not set super's matrix ourselves. 
                //super.getImageMatrix().set(matrix); 
                setImageMatrix(matrix);
//ALPS00126955 END 
            } 
        } 
    } 
//Gipi Add - E 
 
    @Override 
    protected void onLayout(boolean changed, int left, int top,
                            int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);

5
CodeRank
This code example shows how to use the following methods:equals, isIdentity, set
		if (m != null && m.isIdentity()) {
			m = null;
		} 
 
		// don't invalidate unless we're actually changing our matrix 
		if (m == null && !this.mMatrix.isIdentity() || m != null
				&& !this.mMatrix.equals(m)) {
			this.mMatrix.set(m);
			invalidate();
		} 
	} 
 
	// Sets the bitmap for the image and resets the base 
	public void setImageBitmap(final Bitmap bitmap) {
		final int viewWidth = getWidth();
 
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
				&& bitmap != null && bitmap.getHeight() > 1800)
			setLayerType(View.LAYER_TYPE_SOFTWARE, null);
 
4
CodeRank
This code example shows how to use the following methods:equals
  } 
 
  @Override 
  public void setImageMatrix(final Matrix matrix) {
    if ((matrix == null && !getImageMatrix().isIdentity())
        || (matrix != null && !getImageMatrix().equals(matrix))) {
      ImageViewHiddenMethods.configureBounds(this);
    } 
    super.setImageMatrix(matrix);
  } 
 
  @Override 
  public void setImageDrawable(final Drawable drawable) {
    if (storedScaleType != null && drawable != getDrawable()) {
      replaceScaleType(storedScaleType);
      storedScaleType = null;
    } 
    if (minimizeLayoutRequests) { blockLayoutRequests = true; }
    super.setImageDrawable(drawable);
    if (drawable != null) { ImageViewHiddenMethods.configureBounds(this); }
4
CodeRank
This code example shows how to use the following methods:equals
  } 
 
  @Override 
  public void setImageMatrix(final Matrix matrix) {
    if ((matrix == null && !getImageMatrix().isIdentity())
        || (matrix != null && !getImageMatrix().equals(matrix))) {
      ImageViewHiddenMethods.configureBounds(this);
    } 
    super.setImageMatrix(matrix);
  } 
 
  private void resetTransitionArrayCallbacks() { 
    final Drawable[] transitionArray = this.transitionArray;
    if (transitionArray[0] != null) { transitionArray[0].setCallback(null); }
    if (transitionArray[1] != null) { transitionArray[1].setCallback(null); }
  } 
 
  public void setImageDrawableWithTransition(final Drawable drawable, final boolean crossfade) {
    setImageDrawableWithTransition(drawable, TRANSITION_DURATION_DEFAULT, false);
  } 
4
CodeRank
equals Method Overview
Returns true iff obj is a Matrix and its values equal our values.
See Code Examples for other Android Matrix Methods: