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

Menu icons or menu can't be changed programmatically #54

Open
abduldblogger opened this issue Dec 3, 2018 · 8 comments
Open

Menu icons or menu can't be changed programmatically #54

abduldblogger opened this issue Dec 3, 2018 · 8 comments
Assignees

Comments

@abduldblogger
Copy link

First of all, thanks for making this fabulous library!

I am using version 1.2.0 and facing some issues:

  1. There is no method to change menu icons programmatically.
  2. When I tried to overcome this issue by using 2 different menus which hold different icons, I was able to change menu, but UI was distorted.

menu opened first time
menu opened after menu changed

I want to use menus to make an article favorite/ unfavourite, and then according to user input want to change status (icon) of the menu.

Thanks and Regards,
Abdul Aziz Ansari

@abduldblogger abduldblogger changed the title Menu icons or menu can't be changed programatically Menu icons or menu can't be changed programmatically Dec 3, 2018
@JoaquimLey
Copy link
Owner

Hey @abduldblogger,

Thanks for the detailed issue. Have you tried to use a selector instead? You are right I haven't made it possible to change the icons at runtime, but I'm pretty sure you can accomplish this that way ;).

@abduldblogger
Copy link
Author

Hi @JoaquimLey,

thanks for replying, sorry I can't get it, how to use "selector", can you show some demo?

@JoaquimLey
Copy link
Owner

@abduldblogger
Copy link
Author

ohh, got it, but that is basically used for buttons, that has some states, like focused, pressed, default etc, but how in menu? , I have 2 states only, either favorite or unfavorite, hence I have to used 2 different images (heart image), I hope you understood the issue...

@JoaquimLey
Copy link
Owner

Yes it is possible hehe :)

@JoaquimLey
Copy link
Owner

@abduldblogger Do you think I can close this issue?

@abduldblogger
Copy link
Author

abduldblogger commented Dec 13, 2018

@JoaquimLey , that solution is when you press any menu item and then release, so you will see default and pressed state (different icons for example), for the moment when your thumb is on the menu, but afterward it will come back to normal on removing the touch, what I want to achieve is after pressing the menu item, change the menu icon permanently...I hope I am able to explain you

For better understanding, this will be the change change icon in menu:

screenshot_1544707128

@JoaquimLey
Copy link
Owner

Have you tried the solution with the selectors?

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

No branches or pull requests

2 participants