Android Tutorial [B4X] B4XImageView - ImageView + resize modes

B4XImageView is a new custom view, added to XUI Views v2.40.

It adds several useful resize modes to the standard ImageView:

1597820737069.png


(Images source:
)

The bitmaps are never resized, only the internal ImageView is resized. This allows the actual image resizing to be done with hardware acceleration.

All of the resize modes, except of FILL, preserve the image ratio.
The modes are: FIT, FILL, FILL_NO_DISTORTIONS, FILL_WIDTH, FILL_HEIGHT and NONE.

The attached example demonstrates all mode.
B4XImageView also supports clipping the image to a circle. Note that there is a difference in the behavior of this feature between the platforms, when the view is not square.
 

Attachments

  • Example.zip
    352.5 KB · Views: 2,877

DonManfred

Expert
Licensed User
Longtime User

lymey

Active Member
Licensed User
Longtime User
It was updated last week HERE.
And you find it in the first post in the XUI Views thread.
Copy it into the Libraries folder of the platform NOT into the AddionalLibraries folder.
Thanks klaus, I downloaded it again, and updated successfully, not sure what I did but all good now!
 
Top