Open tellfa opened 8 years ago
Hi.
You mean when you click outside the menu area? You can hook up a OnClickListener on your layout and use the isMenuOpened() API to check the state of the menu. If the menu is opened, you can use the toggleMenu() API to close it. Should work for your case if I understand it correctly?
Thank you very much for your quick response <3 can you send me code? please, i really need this library and code. i'm Amateur :( . please help . thanks you my dear firend
Can you post your layout (xml file), where you are using the library? I should be able to expand on that and help you out
thank you man <3 attached xml file in .txt file ArcMenu.txt
can you send me code my friend?
i'm sorry that your time. i use this code :
RelativeLayout r = (RelativeLayout) view.findViewById(R.id.r1);
r.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ArcMenu te = (ArcMenu) view.findViewById(R.id.arcMenu);
if (te.isMenuOpened()== true){
te.toggleMenu();
}
}
});
but it Does not work me! how to fix it?
change to this : public void onClick(View view) { ArcMenu te = (ArcMenu) view.findViewById(R.id.arcMenu); if (te.isMenuOpened()){ te.toggleMenu(); }
but dose not work :(
I am still confused. You have a recycler view. Is that populated with data? And do you have some Click events attached to it, coz the the click event won't be bubbled to the parent if the child is handling it.
i added this code to my adapter (RecyclerView Adapter) but show me FC error :cry: my code in adapter : v.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) {
if (arcMenu.isMenuOpened()){
arcMenu.toggleMenu();
}
return true;
}
});
FC error :
please help me :cry: please
hay @saurabharora90 , can you help me?
This looks the arcMenu variable wasn't initialized. It isn't being thrown by the library. Really difficult to comment without actual code.
Hi, thanks for this library i want close menu with touch to another sides. how to work it?