Android 以编程方式制作工具栏图标动画
Android do ToolBar icon animation programmatically
我怎样才能运行在我想要的时候打开抽屉的动画?
我使用 SupportLibrary v7 使用 "hamburger" 动画。
想这样写方法:
class Activity extends ActionBarActivity{
ToolBar toolbar;
ActionBarDrawerToggle toogle;
...
private void setToolBarIconState(State state) {
if (state == State.menu) {
//flipIconToMenu ?
} else {
//flipIconToBackPointer ?
}
}
我认为这是来自 v7 appcompat 库的默认动画
检查 this。
要实现它,您需要使用 canvas。
如果你想要教程,请按照下面的 link:
https://github.com/neokree/MaterialNavigationDrawer
https://github.com/balysv/material-menu
https://github.com/ikimuhendis/LDrawer
https://github.com/HeinrichReimer/material-drawer
https://github.com/kanytu/android-material-drawer-template
https://github.com/Zlate87/material-navigation-drawer-example
https://github.com/Zlate87/material-navigation-drawer-example
我怎样才能运行在我想要的时候打开抽屉的动画? 我使用 SupportLibrary v7 使用 "hamburger" 动画。 想这样写方法:
class Activity extends ActionBarActivity{
ToolBar toolbar;
ActionBarDrawerToggle toogle;
...
private void setToolBarIconState(State state) {
if (state == State.menu) {
//flipIconToMenu ?
} else {
//flipIconToBackPointer ?
}
}
我认为这是来自 v7 appcompat 库的默认动画
检查 this。
要实现它,您需要使用 canvas。
如果你想要教程,请按照下面的 link:
https://github.com/neokree/MaterialNavigationDrawer
https://github.com/balysv/material-menu
https://github.com/ikimuhendis/LDrawer
https://github.com/HeinrichReimer/material-drawer
https://github.com/kanytu/android-material-drawer-template
https://github.com/Zlate87/material-navigation-drawer-example
https://github.com/Zlate87/material-navigation-drawer-example