B4A Library MSMaterialMenu - Animating icons

This library simulates some animations on the drawer icon on the titlebar that are coming in on the material design.
It comes from this library: https://github.com/balysv/material-menu

68747470733a2f2f7261772e6769746875622e636f6d2f62616c7973762f6d6174657269616c2d6d656e752f6d61737465722f6172742f64656d6f2e676966


Dependencies:
- The NineOldAndroid java package, is included in the zip file.

Credits:
Thanks to Informatix for his NineOldAndroids library and for modifying it for me.

Sample:
B4X:
    Dim StdABHelper As StdActionBarHelper
    Dim MMenu As MSMaterialMenu
    StdABHelper.Initialize
    MMenu.Initialize("MMenu")

    MMenu.setScaleAndStroke(1,2)
    MMenu.Color = Colors.Black
    StdABHelper.Icon = MMenu.Drawable


Sub StdAB_ButtonClicked
    If MMenu.State = "BURGER" Then
        MMenu.animatePressedState("X")
        NavDrawer.OpenDrawer
    Else
        MMenu.animatePressedState("BURGER")
        NavDrawer.CloseDrawer
    End If
End Sub

This will work best with StdActionBar+StdActionBarHelper (wish they were merged).
 

Attachments

  • MSMaterialMenu.zip
    119.5 KB · Views: 2,406
Last edited:

Ricardo Gonzalez Gaete

Member
Licensed User
Longtime User
MSMaterial MEnu

No funciona solo muestra el titulo de la aplicación, pero al presionar el menú no se desplego nada, no hay error, alguien me puede ayudar ?
 

wimpie3

Well-Known Member
Licensed User
Longtime User
There are actually two versions of the lib? 0.51 (front page) and a new version of MSMaterialMenu which also seems to contain other libraries?

I'm using 0.51 and I'm running into a problem. The icon is not always changed.

B4X:
MMenu.animatePressedState("ARROW")
Log(MMenu.State)

This still prints out BURGER, and the icon is not animated.
 

wimpie3

Well-Known Member
Licensed User
Longtime User
OK found out why the icon was not animated: you need to run in release mode... not easy with an application taking over 1 minute to compile...
 
Top