mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-13 23:17:57 +00:00
21 lines
596 B
Java
21 lines
596 B
Java
|
package org.mozilla.gecko.widget;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.util.AttributeSet;
|
||
|
import android.widget.ImageView;
|
||
|
|
||
|
final class SquaredImageView extends ImageView {
|
||
|
public SquaredImageView(Context context) {
|
||
|
super(context);
|
||
|
}
|
||
|
|
||
|
public SquaredImageView(Context context, AttributeSet attrs) {
|
||
|
super(context, attrs);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||
|
setMeasuredDimension(getMeasuredWidth(), getMeasuredWidth());
|
||
|
}
|
||
|
}
|