Android Question How to Load images Bxdrawer

Makumbi

Active Member
Licensed User
i have this line of code where i want to include images
B4X:
ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.MATERIALICONS).Size(22).VerticalAlign(3dip).Append(Chr(0xE145)).PopAll.Append("Profile") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.MATERIALICONS).Size(22).VerticalAlign(3dip).Append(Chr(0xE190)).PopAll.Append("Change Number") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.MATERIALICONS).Size(22).VerticalAlign(3dip).Append(Chr(0xE86A)).PopAll.Append("CheckBalance") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.MATERIALICONS).Size(22).VerticalAlign(3dip).Append(Chr(0xE3B0)).PopAll.Append("Academics") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF1C0)).PopAll.Append("Past Records") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF0E4)).PopAll.Append("New Admissions") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF27B)).PopAll.Append("AccountStatement") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF085)).PopAll.Append("Simple Chat") )
this is the old slidemenu that i have been using

B4X:
sm.Initialize(Activity, Me, "SlideMenu", 42dip, 180dip)
    sm.AddItem("Profile", LoadBitmap(File.DirAssets, "info.png"), 1)
    sm.AddItem("Change Number", LoadBitmap(File.DirAssets, "book_add.png"), 2)
    sm.AddItem("CheckBalance", LoadBitmap(File.DirAssets, "book_open.png"), 3)
    sm.AddItem("Academics", LoadBitmap(File.DirAssets, "degree.png"), 4)
    sm.AddItem("Past Records", LoadBitmap(File.DirAssets, "degree.png"), 6)
    sm.AddItem("New Admissions", LoadBitmap(File.DirAssets, "sms.png"), 9)
    sm.AddItem("AccountStatement", LoadBitmap(File.DirAssets, "calculator.png"), 10)
    sm.AddItem("Simple Chat", LoadBitmap(File.DirAssets, "chat.ico"), 5)
    sm.AddItem("School Events",LoadBitmap(File.DirAssets, "book_open.png"), 7)
    sm.AddItem("Help",LoadBitmap(File.DirAssets, "help.png"), 11)
    sm.AddItem("Exit App",LoadBitmap(File.DirAssets, "lynda.png"), 8)
 

Makumbi

Active Member
Licensed User
i have this line of code where i want to include images
B4X:
ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.MATERIALICONS).Size(22).VerticalAlign(3dip).Append(Chr(0xE145)).PopAll.Append("Profile") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.MATERIALICONS).Size(22).VerticalAlign(3dip).Append(Chr(0xE190)).PopAll.Append("Change Number") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.MATERIALICONS).Size(22).VerticalAlign(3dip).Append(Chr(0xE86A)).PopAll.Append("CheckBalance") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.MATERIALICONS).Size(22).VerticalAlign(3dip).Append(Chr(0xE3B0)).PopAll.Append("Academics") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF1C0)).PopAll.Append("Past Records") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF0E4)).PopAll.Append("New Admissions") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF27B)).PopAll.Append("AccountStatement") )
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append(Chr(0xF085)).PopAll.Append("Simple Chat") )
this is the old slidemenu that i have been using

B4X:
sm.Initialize(Activity, Me, "SlideMenu", 42dip, 180dip)
    sm.AddItem("Profile", LoadBitmap(File.DirAssets, "info.png"), 1)
    sm.AddItem("Change Number", LoadBitmap(File.DirAssets, "book_add.png"), 2)
    sm.AddItem("CheckBalance", LoadBitmap(File.DirAssets, "book_open.png"), 3)
    sm.AddItem("Academics", LoadBitmap(File.DirAssets, "degree.png"), 4)
    sm.AddItem("Past Records", LoadBitmap(File.DirAssets, "degree.png"), 6)
    sm.AddItem("New Admissions", LoadBitmap(File.DirAssets, "sms.png"), 9)
    sm.AddItem("AccountStatement", LoadBitmap(File.DirAssets, "calculator.png"), 10)
    sm.AddItem("Simple Chat", LoadBitmap(File.DirAssets, "chat.ico"), 5)
    sm.AddItem("School Events",LoadBitmap(File.DirAssets, "book_open.png"), 7)
    sm.AddItem("Help",LoadBitmap(File.DirAssets, "help.png"), 11)
    sm.AddItem("Exit App",LoadBitmap(File.DirAssets, "lynda.png"), 8)
B4X:
    ListView1.AddSingleLine( cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(22).VerticalAlign(3dip).Append.Image((LoadBitmap(File.DirAssets, "chat.ico"), 40dip, 40dip, False)).PopAll.Append("Simple Chat"))
i have tried out this but it is bringing error missing Parameter Please help
 
Top