Skip to content

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