I am creating buttons with .PNG background images programmatically and the load times seem inordinately long as compared to creating the same buttons with text only. Is there a method to speed up graphics loads into buttons?
rc is defined above in code as
...
Type RowCol (Row As Int, Col As Int, TradeId As Int, ParentTradeId As Int, Range As Int, Name As String, ImageURL As String)
...
Dim l As Button
l.Initialize("cell")
l.Gravity = alignment
If rc.ImageURL.Trim <> "" Then
Dim BG As BitmapDrawable
bg.Initialize(LoadBitmap(File.DirAssets, rc.ImageURL))
l.Background = bg
Else
l.Text = rc.Name
l.TextSize = fontsize
l.TextColor = fontcolor
End If
l.Tag = rc
rc is defined above in code as
...
Type RowCol (Row As Int, Col As Int, TradeId As Int, ParentTradeId As Int, Range As Int, Name As String, ImageURL As String)
...
Dim l As Button
l.Initialize("cell")
l.Gravity = alignment
If rc.ImageURL.Trim <> "" Then
Dim BG As BitmapDrawable
bg.Initialize(LoadBitmap(File.DirAssets, rc.ImageURL))
l.Background = bg
Else
l.Text = rc.Name
l.TextSize = fontsize
l.TextColor = fontcolor
End If
l.Tag = rc