[B4X] [XUI] AS Bottom Menu V2

jcesar

Active Member
Licensed User
Longtime User
How can i get the menu height ?

I need put a panel high above the Botton menu.
Screenshot_20191008-171012.png
 

jcesar

Active Member
Licensed User
Longtime User
Thanks for your reply.

This property will be available in the designer ?
 

wizard699

Active Member
Licensed User
Longtime User
I've the same problem .... I'm investigating .....

Only if I check TEXT VISIBILE !!!!
 

wizard699

Active Member
Licensed User
Longtime User
Ok I've isolated the problem.
In ASMenuBottom.bas the problem is from 772 line to 785 line

B4X:
xicon_1.SetLayoutAnimated(speed250,xpnl_tab_1.Width/2 - (25dip/1.25)/2,xpnl_tab_1.Height/2 - ((25dip/1.25) + 10dip)/2,25dip/1.25,25dip/1.25)
        xlbl_text_1.SetLayoutAnimated(speed250,0,(xpnl_tab_1.Height/2 - ((25dip/1.25) + 10dip)/2) + xicon_1.Height ,xpnl_tab_1.Width,14dip)
  
        xicon_2.SetLayoutAnimated(speed250,xpnl_tab_2.Width/2 - (25dip/1.25)/2,xpnl_tab_2.Height/2 - ((25dip/1.25) + 10dip)/2,25dip/1.25,25dip/1.25)
        xlbl_text_2.SetLayoutAnimated(speed250,0,(xpnl_tab_2.Height/2 - ((25dip/1.25) + 10dip)/2) + xicon_2.Height ,xpnl_tab_2.Width,14dip)
          
        xicon_3.SetLayoutAnimated(speed250,xpnl_tab_3.Width/2 - (25dip/1.25)/2,xpnl_tab_3.Height/2 - ((25dip/1.25) + 10dip)/2,25dip/1.25,25dip/1.25)
        xlbl_text_3.SetLayoutAnimated(speed250,0,(xpnl_tab_3.Height/2 - ((25dip/1.25) + 10dip)/2) + xicon_3.Height ,xpnl_tab_3.Width,14dip)
          
        xicon_4.SetLayoutAnimated(speed250,xpnl_tab_4.Width/2 - (25dip/1.25)/2,xpnl_tab_4.Height/2 - ((25dip/1.25) + 10dip)/2,25dip/1.25,25dip/1.25)
        xlbl_text_4.SetLayoutAnimated(speed250,0,(xpnl_tab_4.Height/2 - ((25dip/1.25) + 10dip)/2) + xicon_3.Height ,xpnl_tab_4.Width,14dip)
          
        xicon_5.SetLayoutAnimated(speed250,xpnl_tab_5.Width/2 - (25dip/1.25)/2,xpnl_tab_5.Height/2 - ((25dip/1.25) + 10dip)/2,25dip/1.25,25dip/1.25)
        xlbl_text_5.SetLayoutAnimated(speed250,0,(xpnl_tab_5.Height/2 - ((25dip/1.25) + 10dip)/2) + xicon_5.Height ,xpnl_tab_5.Width,14dip)

Investigating......

Ok the problem is only into xlbl_text_5 ..... searching solution...
 
Last edited:

wizard699

Active Member
Licensed User
Longtime User
FOUND IT!!!! The problem is in line 782 !!! There is xicon_3.Height instead of xicon_4.Height

This is the correct code to resolve problem in ASBottomMenu.bas ... only correct line 782. Subistute with this

B4X:
xlbl_text_4.SetLayoutAnimated(speed250,0,(xpnl_tab_4.Height/2 - ((25dip/1.25) + 10dip)/2) + xicon_4.Height ,xpnl_tab_4.Width,14dip)

This correction resolve problem when MIDDLE BUTTON is used as a TAB.
Nov we have to resolve the same problem when MIDDLE BUTTON is NOT USED ad a Tab.
But we are very close to the solution
 
Last edited:

wizard699

Active Member
Licensed User
Longtime User
Alexander, there are problems with MIDDLE BUTTON AS TAB unchecked into designer object properties. I'm searching the correct solution and then I send to you the correction. Ok?
 

Kevin Hartin

Active Member
Licensed User
I am having trouble with the display of the BottomMenu on my Samsung Galaxy 8+

As per the attached screenshots, I have tried Text only, Icon Only and Text&Icon and in each case get the same results. I have applied a 1px Red border to illustrate the problem.

All menus seem to be pushed down by about 40%. I tried to lift the view from the bottom of the page, but that only moves the red box, while the menu stays where it is.

Also, is there a way to remove the white line above the menu?

Thanks,
Kev
Screenshot_20191230-123237.jpg
Screenshot_20191230-123722.jpg
Screenshot_20191230-123852.jpg
 

Kevin Hartin

Active Member
Licensed User
Why you set the view high so small?

bottommenu.PartinglineVisible = false

I have tried all manner of heights for the view, but there is always clipping at the bottom. The following is 100px. As you can see the border in yellow is at 100px, but the menu items are not more than about 60px high, yet are still clipping at the bottom.
The white line I was referring to is the horizontal one above the menu items, not the vertical dividing lines

Screenshot_20191230-171625.jpg

the following screenshot is from another phone and shows even more clipping at the bottom, but still with the same wasted space above the menu items
image.png

for reference, the following are from the demo app, which still suffer some minor clipping at the bottom, but look presentable
Screenshot_20191230-134253.png
Screenshot_20191230-134309.png
 

IDDGroup

Member
Licensed User
Longtime User
is there a way to "Hide" a tab? (disable it)

One of my tabs goes to our website for purchasing items.

the problem is the amazon store does not allow this so i just need to hide it for that market.
 

janderkan

Well-Known Member
Licensed User
Longtime User
In this thread from Feb 20,2019 you present AS Bottommenu V2 with latest update to V2.6
But in the top you have a link to a better menu from Feb 20,2020, AS Bottommenu V1 with latest update to V1.8
1587121021138.png

Why do you think V1 is better than V2 ?
Why use V2 instead of the better V1 ?
 

janderkan

Well-Known Member
Licensed User
Longtime User
hi Please the TabChange (CurrentTab as int) event is not responding in b4i

please any help?
You have to change the NumberOfArguments to 1 in the bas file v2.6
B4X:
Private Sub tabchange_handler(currenttab As Int)
    If xui.SubExists(mCallBack, mEventName & "_TabChange",1) Then
        CallSub2(mCallBack, mEventName & "_TabChange",currenttab)
    End If
End Sub
 
Top