Cableguy Expert Licensed User Longtime User Jul 25, 2011 #1 I've used this before in V1.50 with no problems, but in v1.60 seems to not be working... Code: Copy Activity.AddMenuItem2("Setup","Setup")',LoadBitmap(File.DirAssets,"setup.png")) Only shows the bitmap, without the "Setup" title!
I've used this before in V1.50 with no problems, but in v1.60 seems to not be working... Code: Copy Activity.AddMenuItem2("Setup","Setup")',LoadBitmap(File.DirAssets,"setup.png")) Only shows the bitmap, without the "Setup" title!
H henry1311 Member Licensed User Longtime User Jul 26, 2011 #2 Cableguy said: I've used this before in V1.50 with no problems, but in v1.60 seems to not be working... Code: Copy Activity.AddMenuItem2("Setup","Setup")',LoadBitmap(File.DirAssets,"setup.png")) Only shows the bitmap, without the "Setup" title! Click to expand... the syntax is : Activity.AddMenuItem2("Setup","Setup", LoadBitmap(File.DirAssets,"setup.png")) Ciao enrico
Cableguy said: I've used this before in V1.50 with no problems, but in v1.60 seems to not be working... Code: Copy Activity.AddMenuItem2("Setup","Setup")',LoadBitmap(File.DirAssets,"setup.png")) Only shows the bitmap, without the "Setup" title! Click to expand... the syntax is : Activity.AddMenuItem2("Setup","Setup", LoadBitmap(File.DirAssets,"setup.png")) Ciao enrico
Cableguy Expert Licensed User Longtime User Jul 26, 2011 #3 The code I posted suffers of a copy/paste disease.it was on of my experiments to see what. I was doing wrong.the bug exists,try it yourself.
The code I posted suffers of a copy/paste disease.it was on of my experiments to see what. I was doing wrong.the bug exists,try it yourself.
Erel B4X founder Staff member Licensed User Longtime User Jul 26, 2011 #4 Android doesn't show the text if the image is too large. Try setting a small icon and the text will appear.
Android doesn't show the text if the image is too large. Try setting a small icon and the text will appear.
Cableguy Expert Licensed User Longtime User Jul 26, 2011 #5 Erel said: Android doesn't show the text if the image is too large. Try setting a small icon and the text will appear. Click to expand... In fact the image seems a bit large, althought it's taken from the SDK image sets, wich mean, it the same as the Android system uses! Then why this diference in sizes? Btw, what would be the "perfect" sizing for a menuitem image?
Erel said: Android doesn't show the text if the image is too large. Try setting a small icon and the text will appear. Click to expand... In fact the image seems a bit large, althought it's taken from the SDK image sets, wich mean, it the same as the Android system uses! Then why this diference in sizes? Btw, what would be the "perfect" sizing for a menuitem image?
Cableguy Expert Licensed User Longtime User Jul 26, 2011 #6 Cableguy said: Btw, what would be the "perfect" sizing for a menuitem image? Click to expand... According to the documentation on Android forums, the icon size is density dependant...so developers have to/should provide image sets for low, med and high density screens (1.0, 1.5 and 2.0)... Since B4A is density aware, will a med density set suffice? Will the images be resized to density? Values are as follows: Low 36x36 Med 48x48 Hi 72x72
Cableguy said: Btw, what would be the "perfect" sizing for a menuitem image? Click to expand... According to the documentation on Android forums, the icon size is density dependant...so developers have to/should provide image sets for low, med and high density screens (1.0, 1.5 and 2.0)... Since B4A is density aware, will a med density set suffice? Will the images be resized to density? Values are as follows: Low 36x36 Med 48x48 Hi 72x72
Erel B4X founder Staff member Licensed User Longtime User Jul 27, 2011 #7 I believe that the size should be 36x36. The image will be scaled automatically.
Cableguy Expert Licensed User Longtime User Jul 27, 2011 #8 Erel said: I believe that the size should be 36x36. The image will be scaled automatically. Click to expand... At the moment I am using the 48x48 icon size and it seems to be the same size as used by other apps...I'll stick with it for the time being...But I believe this "issue" should be adressed in the AddMenuItem2 topic.
Erel said: I believe that the size should be 36x36. The image will be scaled automatically. Click to expand... At the moment I am using the 48x48 icon size and it seems to be the same size as used by other apps...I'll stick with it for the time being...But I believe this "issue" should be adressed in the AddMenuItem2 topic.
fabio_linate_milano Member Licensed User Longtime User Jun 21, 2015 #9 Hi everyone similar problem Just a new source (I save of course) I add a file in the tab files section (file name is info.png and it is 48x48) I add the following line Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Activity.AddMenuItem2("info", "info", LoadBitmap(File.DirAssets, "info.png")) End Sub the icon does NOT appear. Any idea, help, ... thank you very much best regard fabio milano
Hi everyone similar problem Just a new source (I save of course) I add a file in the tab files section (file name is info.png and it is 48x48) I add the following line Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Activity.AddMenuItem2("info", "info", LoadBitmap(File.DirAssets, "info.png")) End Sub the icon does NOT appear. Any idea, help, ... thank you very much best regard fabio milano
Erel B4X founder Staff member Licensed User Longtime User Jun 22, 2015 #10 This is a thread from 2011. Please start a new one instead.
fabio_linate_milano Member Licensed User Longtime User Jun 22, 2015 #11 Hi sorry I'll try to formulate the problem more exactly when ready I'll start a new thread thx