Android Tutorial [B4X] B4XImageView - ImageView + resize modes

Erel

Administrator
Staff member
Licensed User
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

DonManfred

Expert
Licensed User

klaus

Expert
Licensed 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.
 
Top