Animations for Android L drawer, back, dismiss and check icons
Major update
MaterialMenuDrawable
and MaterialMenuView
.extras
packages since ActionBarCompat or ActionBarSherlock are not being maintained
for quite a while now. Most usages will be with Toolbar
. Integrating the drawable into it will be up
to the user of the library (see README or demo).nineoldadroids
dependency - reduced method count by 929!app:mm_iconState="enum"
attribute to MaterialMenuView
that allows setting the
initial state of the drawable.AppCompatActivity
instead of ActionBarActivity
for extras-toolbar
packageMaterialMenuView
visibility is now preserved on SavedState
API break: Circle pressed state is no longer supported.
MaterialMenu.animatePressedState(IconState)
is now deprecated and should be replaced
by MaterialMenu.animateState(IconState)
MaterialMenu.setPressedDuration(int)
has been removed.
Added new API to allow setting icon visibility
Usage:
MaterialMenu.setVisible(boolean visible)
Usage: MaterialMenuIconCompat
in extras-toolbar
package
Usage: MaterialMenu.setAnimationListener(Animator.AnimatorListener)
If old icons are required, use material-menu:1.4.0
MaterialMenuIcon
.Usage:
import com.balysv.materialmenu:material-menu-toolbar:1.x.x
and use MaterielMenuIconToolbar
MaterialMenuIcon
MaterialMenuIcon
since
you could see some extra space on the left side of the icon.
If a different margin is required, find the 'Home' view of the ActionBar and apply them
(example for stock ActionBar) :View view = activity.getWindow().getDecorView().findViewById(
resources.getIdentifier("android:id/home", null, null)
);
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
params.leftMargin = someMargin;
MaterialMenuBase
abstraction improvementsUsage:
MaterialMenu.setTransformationOffset(AnimationState state, float value)
where AnimationState
is one of BURGER_ARROW, BURGER_X, ARROW_X, ARROW_CHECK, BURGER_CHECK, X_CHECK
and value
is between 0
and 2
Usage: Use API MaterialMenu.setRTLEnabled(boolean enabled)
or set an xml
attribute mm_rtlEnabled="boolean"
Usage: MaterialMenu.getIconState()