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

Add alpha change listener #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jenzz
Copy link

@jenzz jenzz commented Mar 30, 2014

I recently needed a listener for the ActionBar's alpha value.
Reason being that I can fade in/out the ActionBar title and subtitle along with the background drawable.

Simple addition. Feel free to merge if you find it useful.

@deRonbrown
Copy link

+1 I've used this in my implementation as well. Perhaps you could implement it as a factory method so you can chain it all together.

@MariusVolkhart
Copy link

👍 I'm using this in our implementation also. I too would like to see this as a chainable method.

@SimonStefan
Copy link

+1

1 similar comment
@lbloder
Copy link

lbloder commented Nov 13, 2014

+1

@NikolaDespotoski
Copy link

I needed something similar to this. Here is a workaround:
Uses reflection to get internal scroll listener then it dispatches the event's down to the super class. It also gives possibility to chain more than one scroll listener. Order scroll event receivers is: superclass -> class -> list of partner scroll listeners

Usage:

NotifyingFadingActionBar fadingActionBarHelper = new NotifyingFadingActionBar(this)
                .withCallback(this)
                .headerLayoutResId(R.layout.place_header)
                .addOnScrollListener(myScrollListener)
                .actionBarBackground(mActionbarDrawable)
                .contentLayout(R.layout.activity_waiting_list);
        setContentView(fadingActionBarHelper.createView(this));

https://gist.github.com/NikolaDespotoski/009595717408e7854efd

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

Successfully merging this pull request may close these issues.

6 participants