Android Question custom list view panel !

Devv

Active Member
Licensed User
Longtime User
I was working and every thing was fine then i started to get this error without changing anything in the project




the code that is making the error

B4X:
        Dim pnl As Panel
        pnl = clv2.GetPanel(x)   'index of the clicked row  or knowing which row item you wish to edit
        Dim imv As ImageView
        imv =  pnl.GetView(0)        ' 0 = first view added to panel/row ... 1 = 2nd view etc (refer Sub CreateListItem)       
       
        If clv2.GetValue(x) = AsyncDownloader.FileName Then
             imv.Bitmap = LoadBitmap(File.DirInternalCache,AsyncDownloader.FileName)  
        End If
 

LucaMs

Expert
Licensed User
Longtime User
It is more likely that we poor programmers become crazy, rather than sw.

Many times I thought "I have changed anything" but then I discovered...

pnl.GetView(0)
it seems to be an EditText, not an ImageView.

I would try creating the panel again; also, setting the Tags of the views, you can debug your sw better:
B4X:
Dim pnl As Panel
pnl = clv2.GetPanel(x)   'index of the clicked row  or knowing which row item you wish to edit
' Dim imv As ImageView
Dim V as View = pnl.GetView(0)
Log(GetType(V) & Tab & V.Tag)
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…