mobile/android/base/widget/SquaredImageView.java

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 package org.mozilla.gecko.widget;
     3 import android.content.Context;
     4 import android.util.AttributeSet;
     5 import android.widget.ImageView;
     7 final class SquaredImageView extends ImageView {
     8     public SquaredImageView(Context context) {
     9         super(context);
    10     }
    12     public SquaredImageView(Context context, AttributeSet attrs) {
    13         super(context, attrs);
    14     }
    16     @Override
    17     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    18         super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    19         setMeasuredDimension(getMeasuredWidth(), getMeasuredWidth());
    20     }
    21 }

mercurial