If you see the Google Play
app , when swiping the menu the menu button
convert itself to back button
with the finger gradually and nicely, it seems not an animation. can any one help me to achieve this thing ?
Feel free to move/close the post but please be nice to redirect me in any helpful direction.
Asked
Active
Viewed 815 times
3

Ishtiaq
- 1,206
- 9
- 18
-
1just create a [Navigation Drawer](http://developer.android.com/training/implementing-navigation/nav-drawer.html) using the new Toolbar widget and it takes care of everything. Just make the navdrawer appear below the toolbar, [check this link](http://stackoverflow.com/questions/26476837/android-5-0-material-design-style-navigation-drawer-for-kitkat) – peguerosdc Nov 26 '14 at 09:55
-
thanks, checking that – Ishtiaq Nov 26 '14 at 10:00
1 Answers
0
Icon transitions can be implemented using AnimatedStateListDrawable (There’s also support for animated vector icons.)
e.g.
public void setOrAnimatePlusCheckIcon(final ImageView imageView, boolean isCheck,
boolean allowAnimate) {
if (!hasL()) {
compatSetOrAnimatePlusCheckIcon(imageView, isCheck, allowAnimate);
return;
}
Drawable drawable = imageView.getDrawable();
if (!(drawable instanceof AnimatedStateListDrawable)) {
drawable = mActivity.getResources().getDrawable(R.drawable.add_schedule_fab_icon_anim);
imageView.setImageDrawable(drawable);
}
imageView.setColorFilter(isCheck ?
mActivity.getResources().getColor(R.color.theme_accent_1) : Color.WHITE);
if (allowAnimate) {
imageView.setImageState(isCheck ? STATE_UNCHECKED : STATE_CHECKED, false);
drawable.jumpToCurrentState();
imageView.setImageState(isCheck ? STATE_CHECKED : STATE_UNCHECKED, false);
} else {
imageView.setImageState(isCheck ? STATE_CHECKED : STATE_UNCHECKED, false);
drawable.jumpToCurrentState();
}
}
code from https://github.com/google/iosched

Petr Duchek
- 1,223
- 14
- 19