AndreyPozdnyakov
Member
I need to make a background for the views so that only part of the image is visible.
For example, the top half.
Standard code. imvForeground is already built into the Activity.
I'm testing on multiple devices.
On the smartphone "Xiaomi Redmi Note 11 Pro", Anroid 13,
On a smartphone "ZTE Blade A0622", Android 7,
on the tablet "BQ-1045G", Anroid 8.
On both smartphones, the code works fine.
The tablet displays the top left quarter of the image across the entire imvForeground.
How can this be?
For example, the top half.
Standard code. imvForeground is already built into the Activity.
B4X:
Dim cvs As Canvas
Dim img As Bitmap
Dim Rect1 As Rect
Dim Rect2 As Rect
cvs.Initialize(imvForeground)
img.Initialize(File.DirAssets, "image.png")
Rect1.Initialize(0, 0, img.Width, img.Height/2)
Rect2.Initialize(0, 0, img.Width, img.Height/2)
cvs.DrawBitmap(img, Rect2, Rect1)
imvForeground.Invalidate2(Rect1)
I'm testing on multiple devices.
On the smartphone "Xiaomi Redmi Note 11 Pro", Anroid 13,
On a smartphone "ZTE Blade A0622", Android 7,
on the tablet "BQ-1045G", Anroid 8.
On both smartphones, the code works fine.
The tablet displays the top left quarter of the image across the entire imvForeground.
How can this be?