-
Notifications
You must be signed in to change notification settings - Fork 454
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
How to apply setOnClickListener in the menu layout? #78
Comments
how are ,what is this ??
J5 prime
…On Fri, 6 Nov 2020, 9:39 am leonlee0116 ***@***.*** wrote:
In activity onCreate
View view = LayoutInflater.from(this).inflate(R.layout.content_setting, null);
slidingRootNav = new SlidingRootNavBuilder(this)
.withMenuOpened(true)
.withContentClickableWhenMenuOpened(true)
.withSavedState(savedInstanceState)
.withMenuView(view)
.inject();
``
And in my content_setting.xml i have a button, i need to apply action on it so I put
LinearLayout btn = slidingRootNav.getLayout().findViewById(R.id.btnClose);
btn.setOnClickListener(new View.OnClickListener() {
@OverRide <https://github.com/override>
public void onClick(View v) {
if(slidingRootNav.isMenuOpened()){
slidingRootNav.closeMenu();
} else {
slidingRootNav.openMenu();
}
}
});
But the click is not responding, no return error to me also.
Is there any correct way to do it?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#78>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARJG7J2KIMIOKXXLV6ISOULSOORZPANCNFSM4TMK44UA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In activity onCreate
And in my content_setting.xml i have a button, i need to apply action on it so I put
But the click is not responding, no return error to me also.
Is there any correct way to do it?
The text was updated successfully, but these errors were encountered: