Code example for Activity

public class ImageSizeTest { 
	private Activity mActivity;
	private ImageView mView;
	private ImageAware mImageAware;
	public void setUp() throws Exception { 
		mActivity = new Activity();
		// Make and set view with some prelim values to test 
		mView = new TestImageView(mActivity);
		mView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
		mView.measure(View.MeasureSpec.makeMeasureSpec(250, View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(250, View.MeasureSpec.EXACTLY));
		mImageAware = new ImageViewAware(mView);
	public void testGetImageSizeScaleTo_useImageActualSize() throws Exception { 
Experience pair programming with AI  Get Codota for Java