Spanish Menu tipo Linkedin o Whatsapp

Santiago Russo

Member
Licensed User
Buenas. La consulta es la siguiente. ¿Es posible hacer un menú como el de Linkedin, o el de Whatsapp?
No me interesan por ahora los numeritos rojos que aparecen abajo, pero si se puede, mejor.

Adjunto una imagen para ser más claro.

Gracias.
 

Attachments

  • MenuLInkedin.jpeg
    MenuLInkedin.jpeg
    54.4 KB · Views: 182

José J. Aguilar

Expert
Licensed User
I've remembered this one too:
EDIT: Uy, no me acordaba que era el foro español.
He recordado ahora este también. Los númeritos que dices se llaman badget, creo que alguno de los menús que te he puesto los soporta también.
 

Santiago Russo

Member
Licensed User
I've remembered this one too:
EDIT: Uy, no me acordaba que era el foro español.
He recordado ahora este también. Los númeritos que dices se llaman badget, creo que alguno de los menús que te he puesto los soporta también.

Mil Perdones, pero no he podido poner mas de tres elementos. Al 4 y 5 simplemente los ignora. ¿Estoy haciendo algo mal?
 

José J. Aguilar

Expert
Licensed User
No he usado esas librerías, pero pon tu código y los probamos a ver, o exporta tu proyecto que lo veamos.
 
Last edited:

Santiago Russo

Member
Licensed User
Buenos días. Simplemente puse un 4° y 5° ítem. Pero los ignoró.

B4A:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Layout1")
    
    
    WobbleMenu1.SetTabIcon(1, Chr(0xF009),Typeface.FONTAWESOME)
    WobbleMenu1.SetTabIcon(2,Chr(0xF0CA),Typeface.FONTAWESOME)
'    WobbleMenu1.SetTabIcon(3,Chr(0xF0EC),Typeface.FONTAWESOME)
'    WobbleMenu1.SetTabIcon(4,Chr(0xF24D),Typeface.FONTAWESOME)
'    WobbleMenu1.SetTabIcon(3, Chr(0x480F), Typeface.FONTAWESOME)
'    WobbleMenu1.SetTabIcon(4, Chr(0x4810), Typeface.FONTAWESOME)
    WobbleMenu1.SetTabIcon(3, Chr(0xFF11), Typeface.FONTAWESOME)
    WobbleMenu1.SetTabIcon(4, Chr(0xFF12), Typeface.FONTAWESOME)
    
    
    
'   
'    WobbleMenu1.SetTabIcon(6, Chr(0xF2D0), Typeface.FONTAWESOME)

End Sub

Hasta el 3, lo hace bien. El 4° ya lo ignora.
 

oparra

Well-Known Member
Licensed User
B4X:
#Region  Project Attributes
    #ApplicationLabel: B4XBottomMenu Sample
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

#BridgeLogger: True

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Private xui As XUI
    Private B4XBottomMenu1 As B4XBottomMenu
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Main")
    Activity.Title = "B4XBottomMenu Sample"

    'set icons fonts
    Dim IconsFont As B4XFont
    IconsFont =  xui.CreateFont(Typeface.LoadFromAssets("icons.ttf"),64)
    
    'set menu
    B4XBottomMenu1.SetMenuItems = 4 'default 2 (Range 2 to 5)
    B4XBottomMenu1.SetBackgroundColor = xui.Color_White 'default white
    
    'set menu item
    B4XBottomMenu1.SetItem(1, "Map",      B4XBottomMenu1.SetFontToBitmap(Chr(0xf981), IconsFont, 36, xui.Color_White))
    B4XBottomMenu1.SetItem(2, "Routes",  B4XBottomMenu1.SetFontToBitmap(Chr(0xfb4a), IconsFont, 36, xui.Color_White))
    B4XBottomMenu1.SetItem(3, "Messages",B4XBottomMenu1.SetFontToBitmap(Chr(0xf189), IconsFont, 36, xui.Color_White))
    B4XBottomMenu1.SetItem(4, "Setting", B4XBottomMenu1.SetFontToBitmap(Chr(0xf8ba), IconsFont, 36, xui.Color_White))
    B4XBottomMenu1.SetItem(5, "Other",   B4XBottomMenu1.SetFontToBitmap(Chr(0xf433), IconsFont, 36, xui.Color_White))

    ' ***************  middlebutton ***************
    
    'set color
    B4XBottomMenu1.SetMiddleButtonBackgroundColor = xui.Color_Blue

    'set icon
    B4XBottomMenu1.SetMiddleButtonIcon = B4XBottomMenu1.SetFontToBitmap(Chr(0xf4fe), IconsFont, 36, xui.Color_White)
    B4XBottomMenu1.SetMiddleButtonIconColor = xui.Color_White
    
    'set border
    B4XBottomMenu1.SetMiddleButtonBoderSize = 0 'default 0 Not Visible
    B4XBottomMenu1.SetMiddleButtonBoderColor = xui.Color_LightGray
    
    'set visible
    B4XBottomMenu1.SetMiddleButtonVisible = False 'default False

    'set type wave
'    B4XBottomMenu1.SetMiddleButtonTypeWave = True 'default False

    'set size
    B4XBottomMenu1.SetMiddleButtonSize = 80 'default 80% (Range 60% to 80% the height mbase)

    ' ***************  Items ***************

    B4XBottomMenu1.SetItemSelected = 1 'default 1 (Max. value SetMenuItems)
    B4XBottomMenu1.SetItemTextVisible = True 'default True
    
    'set icons and items color
    B4XBottomMenu1.SetItemIconColors(0xFF979799, 0xFF0062CA, 0xFFAEAEB0)
    B4XBottomMenu1.SetItemTextColors(0xFF979799, 0xFF0062CA, 0xFFAEAEB0)

    'set item badge
    B4XBottomMenu1.SetItemBadgeVisible = True 'default False
    B4XBottomMenu1.SetItemBadgeColor(2, xui.Color_DarkGray)
    
    'set item underline
    B4XBottomMenu1.SetItemUnderlineVisible = False 'default False
    B4XBottomMenu1.SetItemUnderlineColor = xui.Color_Blue
    B4XBottomMenu1.SetItemUnderlineAnimation = B4XBottomMenu1.ANIMATION_NORMAL
    
    'set Item separator
'    B4XBottomMenu1.SetItemSeparatorVisible = True 'default False
    B4XBottomMenu1.SetItemSeparatorColor = xui.Color_LightGray
    
    'set Item ripple effect
    B4XBottomMenu1.SetItemRippleEffectVisible = True 'default True
    B4XBottomMenu1.SetItemRippleEffectColor =  xui.Color_Gray 'default color gray
    B4XBottomMenu1.SetItemRippleEffectDuration = 300 'default 300

    ' ***************  Test ***************

    'set badge value
    B4XBottomMenu1.SetItemBadgeValue(3, 10)
    
    'Trigger item menu
    B4XBottomMenu1_MenuItemClick(B4XBottomMenu1.GetItemSelected)
    
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub B4XBottomMenu1_MiddleButtonClick
    Log($"MiddleButtonClick"$)
End Sub

Sub B4XBottomMenu1_MiddleButtonLongClick
    Log($"MiddleButtonLongClick"$)
End Sub

Sub B4XBottomMenu1_MenuItemClick (ItemId As Int)
    Log($" Click Item ${ItemId} / badge value ( ${B4XBottomMenu1.GetItemBadgeValue(ItemId)} ) "$)
End Sub
 

José J. Aguilar

Expert
Licensed User
 
Top