public ImageView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    initImageView();

    TypedArray a =
        context.obtainStyledAttributes(
            attrs, com.android.internal.R.styleable.ImageView, defStyle, 0);

    Drawable d = a.getDrawable(com.android.internal.R.styleable.ImageView_src);
    if (d != null) {
      setImageDrawable(d);
    }

    mBaselineAligned =
        a.getBoolean(com.android.internal.R.styleable.ImageView_baselineAlignBottom, false);

    setAdjustViewBounds(
        a.getBoolean(com.android.internal.R.styleable.ImageView_adjustViewBounds, false));

    setMaxWidth(
        a.getDimensionPixelSize(
            com.android.internal.R.styleable.ImageView_maxWidth, Integer.MAX_VALUE));

    setMaxHeight(
        a.getDimensionPixelSize(
            com.android.internal.R.styleable.ImageView_maxHeight, Integer.MAX_VALUE));

    int index = a.getInt(com.android.internal.R.styleable.ImageView_scaleType, -1);
    if (index >= 0) {
      setScaleType(sScaleTypeArray[index]);
    }

    int tint = a.getInt(com.android.internal.R.styleable.ImageView_tint, 0);
    if (tint != 0) {
      setColorFilter(tint, PorterDuff.Mode.SRC_ATOP);
    }

    mCropToPadding = a.getBoolean(com.android.internal.R.styleable.ImageView_cropToPadding, false);

    a.recycle();

    // need inflate syntax/reader for matrix
  }
 public ImageView(Context context) {
   super(context);
   initImageView();
 }