Thank you derez.
Still have a problem understanding this.
Why is an image that is formatted to be 800x480 zoomed in about 15-20%
when loaded even in the designer before any code is loaded. Gravity set to fill works and entire image is presented but distorts images that are 640x480.
Again, my phisical device screen is 800x480, image view is 800x480 gravity center (anything other than fill to be exact), application set to full screen, in the designer you can see the ImageView1 outline (red squares) fitting exactly into the screen yet when selecting image (in the designer) ImageView property "image file:" the resulting displayed image extends beyond the screen borders about 15-20%
Obviously some scaling / zooming is going on.
Even pictures that are 640x480 that should fill the height of the screen exactly and have empty space on both sides (800- 640 = 160 pixels) but are not. The top and bottom of such file is also cut off like it is zoomed in.
Any one could try it without any code just the designer.
Seems like a bug but I don't want to offend anyone in case I am just slow.:sign0013:
If I get this to behave normally then I will try to understand and implement your method of rectangles to handle images larger than screen size.
Here is my code but even without code you can observe this behavior in the designer by assigning files directly and looking at the device for result.
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ImageView1 As ImageView
Dim i As Int
i = 0
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("SlideShow") 'Load the layout file.
End Sub
Sub Activity_Resume
'ImageView1.Initialize("ImageView1")
ImageView1.Enabled = True
ImageView1.Visible = True
ImageView1.Bitmap =LoadBitmap(File.DirAssets, "10.jpg")
ImageView1.Gravity = Gravity.center
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub ImageView1_Click
i = i +1
If i > 4 Then i = 0
Dim p_num As String
p_num = "1" & i & ".jpg"
ImageView1.Bitmap = LoadBitmap(File.DirAssets, p_num)
ImageView1.Gravity = Gravity.CENTER
End Sub
Sub ImageView1_LongClick
Activity.Finish
End Sub