anshulagarwal2k/GooeyMenu

How to make gooey menu closed when app opens

Opened this issue · 6 comments

Whenever I start my app gooey menu opens automatically, it needs to be in closed state .. What I need to do ?

nope. It doesn't work for me...

MainActivity.java#

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.add_alarms1);
mGooeyMenu = (GooeyMenu) findViewById(R.id.gooey_menu);
mGooeyMenu.startHideAnimate();
mGooeyMenu.setOnMenuListener(this);
}

GooeyMenu.java#

public void startHideAnimate() {
    mRotationReverseAnimation.start();
    for (ObjectAnimator objectAnimator : mHideAnimation) {
        objectAnimator.start();
    }
}

It is working in on item click listener but on start of activity it is not working.

i have that problem too does any one can help?

i have a half solution:

in GooeyMenu.java:

  public void startHideAnimateWhenItemClicked() {
        isMenuVisible = false;
      startHideAnimate();
  }

in MainActivity.java:

  public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_main, menu);
        mGooeyMenu.startHideAnimateWhenItemClicked();
        return true;
    }

this code close GooeyMenu when the app start (side effect you can see the app close)