Android Question tabhost with icons

merlin2049er

Well-Known Member
Licensed User
Longtime User
I don't see my icons appearing? I loaded them into the assets directory, and defined and loaded them.

The only thing is I'm using the same icon for default and selected. Is that a problem?
 

merlin2049er

Well-Known Member
Licensed User
Longtime User
ok, i've added 2 icons for each tab. 32 x 32 pixels still won't show up.

B4X:
  Dim featureicon, featureiconselected, browseicon,browseiconselected , inquireicon, inquireiconselected As Bitmap
 
  featureicon = LoadBitmap(File.DirAssets,"star_empty.png")
  featureiconselected = LoadBitmap(File.DirAssets,"star_full.png")
 
  browseicon = LoadBitmap(File.DirAssets,"file.png")
  browseiconselected = LoadBitmap(File.DirAssets,"file_search.png")
 
  inquireicon = LoadBitmap(File.DirAssets,"mail.png")
  inquireiconselected = LoadBitmap(File.DirAssets,"mail_send.png")
 
  ' TabHost1.AddTab("Featured","featured.bal")
  TabHost1.AddTabWithIcon("Featured",featureicon,featureiconselected,"featured.bal")
 
 
  ' TabHost1.AddTab("Browse","2.bal")
  TabHost1.AddTabWithIcon("Browse",browseicon,browseiconselected,"2.bal")
   
  ' TabHost1.AddTab("Inquire","inquiry.bal")
  TabHost1.AddTabWithIcon("Inquire",inquireicon,inquireiconselected,"inquiry.bal")

It looks ok?
 
Upvote 0
Top