For i = 0 To packages.Size - 1
If GetType(packageManager1.GetApplicationIcon(packages.Get(i))) = "android.graphics.drawable.BitmapDrawable" Then
Dim d As BitmapDrawable = packageManager1.GetApplicationIcon(packages.Get(i))
listview1.AddTwoLinesAndBitmap2(packageManager1.GetApplicationLabel(packages.Get(i)),i,d.Bitmap,i)
Else
listview1.AddTwoLines2(packageManager1.GetApplicationLabel(packages.Get(i)),i,i)
End If
Next