Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close Menu #1

Open
tellfa opened this issue Dec 23, 2015 · 11 comments
Open

Close Menu #1

tellfa opened this issue Dec 23, 2015 · 11 comments
Labels

Comments

@tellfa
Copy link

tellfa commented Dec 23, 2015

Hi, thanks for this library
i want close menu with touch to another sides. how to work it?

@saurabharora90
Copy link
Owner

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?

@tellfa
Copy link
Author

tellfa commented Dec 23, 2015

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

@saurabharora90
Copy link
Owner

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

@tellfa
Copy link
Author

tellfa commented Dec 23, 2015

thank you man <3
attached xml file in .txt file
ArcMenu.txt

@tellfa
Copy link
Author

tellfa commented Dec 23, 2015

can you send me code my friend?

@tellfa
Copy link
Author

tellfa commented Dec 23, 2015

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?

@tellfa
Copy link
Author

tellfa commented Dec 23, 2015

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 :(

@saurabharora90
Copy link
Owner

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.

@tellfa
Copy link
Author

tellfa commented Dec 28, 2015

i added this code to my adapter (RecyclerView Adapter) but show me FC error 😢
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 :
error

please help me 😢 please

@tellfa
Copy link
Author

tellfa commented Dec 30, 2015

hay @saurabharora90 , can you help me?

@saurabharora90
Copy link
Owner

This looks the arcMenu variable wasn't initialized. It isn't being thrown by the library. Really difficult to comment without actual code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants