Android Question ImageView question

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi, I've noticed that some images didn't show up in ImageView.
Here is my code
ImageView:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private btnNext As Button   
    Private lblProvider As Label
    Private btnBack As Button   
    Private ivPhoto As ImageView
End Sub

Private Sub ShowPhoto
    
    Try
        
        Dim BitMap As Bitmap       
        Dim str As String
        
        str=Main.ProviderID
        
        lblProvider.Text=Main.ProviderName & " " & str
        
        If Main.PhotoURL="" Then
            Return
        End If
        
        If File.Exists(File.DirDefaultExternal,Main.PhotoURL)=False Then
            Return
        End If
        
        BitMap=LoadBitmap(File.DirDefaultExternal,Main.PhotoURL)
        
        ivPhoto.Bitmap=BitMap
        
    Catch
        Log("ShowPhoto " & LastException)
        modFun.ShowError("ShowPhoto " & LastException)
    End Try
    
End Sub

File exists in the folder, LoadBitmap doesn't throw any exception but nothing show up. I tried a few different images. What I found so far that if file is less than 1 Mb it works Ok but bigger files don't. I didn't try any files over 4 Mb. All of them are jpg.

Is there any limitations?
 
Top