2

animation

How can I run animation of opening drawer at moment I want? I used SupportLibrary v7 use "hamburger" animation. Want to write method like this:

class Activity extends ActionBarActivity{
   ToolBar toolbar;
   ActionBarDrawerToggle toogle;

   ...

   private void setToolBarIconState(State state) {
      if (state == State.menu) {
          //flipIconToMenu ?
      } else {
          //flipIconToBackPointer ?
      }
   }
punksta
  • 2,738
  • 3
  • 23
  • 41

2 Answers2

1

I think that is the default animation from v7 appcompat library

Check this out.

Community
  • 1
  • 1
Karan
  • 2,120
  • 15
  • 27
  • Yes, I've already done it. I want write method to change state not depends on opened drawer, but depends on other actions, – punksta Mar 22 '15 at 16:46
  • Well taking a peek in v7 source code it looks like they extend DrawerArrowDrawable class – Karan Mar 22 '15 at 17:07
  • You can use this library in your app https://github.com/ChrisRenke/DrawerArrowDrawable – Karan Mar 22 '15 at 17:07