Khalid.
Member
The image is not loaded only when the screen is flipped horizontally, as shown in the Video
B4X:
Sub Process_Globals
Private xui As XUI
Public Chooser As ContentChooser
Public ImageDir = File.DirAssets As String
Public ImageFileName = "image0.jpg" As String
End Sub
Sub Globals
Private bmpRose As B4XBitmap
Private imvOriginal As B4XView
Private bmcRose As BitmapCreator
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
bmpRose = xui.LoadBitmap(ImageDir, ImageFileName)
bmcRose.Initialize(bmpRose.Width, bmpRose.Height)
bmcRose.CopyPixelsFromBitmap(bmpRose)
imvOriginal.SetBitmap(bmpRose)
imvOriginal.As(ImageView).Gravity = Gravity.FILL
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnLoadImage_Click
Chooser.Initialize("Chooser")
Chooser.Show("image/*", "Select an image")
End Sub
Private Sub Chooser_Result (Success As Boolean, Dir As String, FileName As String)
If True Then
ImageDir = Dir
ImageFileName = FileName
End If
End Sub