I have finally got round to trying the xui library. I am trying the fillimagetoview example code posted by Erel.
Unfortunately I get the following error.
ImageView.SetBitmap(bmp.Resize(ImageView.Width, I
src\b4j\example\main.java:144: error: package android.graphics does not exist
_imageview.SetBitmap((android.graphics.Bitmap)(_bmp.Resize(_imageview.getWidth(),_imageview.getHeight(),anywheresoftware.b4a.keywords.Common.True).getObject()));