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

added lighlight methods without triggering listener #770

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

echan0524
Copy link

@echan0524 echan0524 commented May 9, 2017

added new methods to select/highlight tab without triggering listener.
highlightTabWithId()
highlightTabAtPosition()

@yombunker
Copy link
Collaborator

@echan0524 what are you trying to achieve with this? if is just changing the icon in some way you can get the same by using selector state and setting something in the tab

@echan0524
Copy link
Author

echan0524 commented May 10, 2017

@yombunker
probably, I should change the method to "select" instead of the highlight. What I'm trying to achieve is programmatically select the tab without firing the listener.

It might be easier to understand the if I rename the methods to "selectOnlyWithId()" and "selectOnlyAtPosition" or something similar.

I just found another PR which is trying to achieve the same goal.
#652

@yombunker
Copy link
Collaborator

@echan0524 if you only want to highlight instead of "selecting" it, then i would again recommend using a selector, in that case you can just modify the state of the tab, and then the drawable will change. there is no need to add ifs all the way just to avoid actually selecting it.

@echan0524
Copy link
Author

echan0524 commented May 12, 2017

@yombunker
I want to select, not highlight as I mentioned on my previous post. I will change the method name to select.

@yombunker
Copy link
Collaborator

@echan0524 i don't understand what you mean with select but don't highlight? what's the difference between select and the current behavior of select? maybe i'm the one with the problem, but, i don't understand the problem you are trying to solve. can you explain me what's the goal of this.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 63.267% when pulling 5445af0 on iheartradio:support_highlight_only_tab into 18f8290 on roughike:master.

@yombunker
Copy link
Collaborator

@echan0524 still waiting on your description, because for me it looks like you only want to "change" the highlighted state of the tab, which like i said you could get that with drawable selector

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

Successfully merging this pull request may close these issues.

3 participants