Android-ObservableScrollView icon indicating copy to clipboard operation
Android-ObservableScrollView copied to clipboard

Fading toolbar with image and RecyclerView not working

Open buneme opened this issue 9 years ago • 1 comments

I'm using code from this Gist and this is what I am trying to achieve (a fading ToolBar). However, when I start up my app I get the following error:

java.lang.NullPointerException: Attempt to write to field 'int android.view.ViewGroup$LayoutParams.height' on a null object reference

This is referring to the following line of code which is also on line 54 of this, as well as here:

headerView.getLayoutParams().height = mFlexibleSpaceImageHeight;

When I comment out that line of code, the error stops appearing, but I don't get the fading effect I want; instead, the RecyclerView appears above the toolbar. The code I used is exactly the same (I've triple checked) as the following:

Here's the problematic scrolling effect: enter image description here enter image description here The image behind the list is inside of the toolbar; that image, along with the toolbar should be in front of the list. The green bar in the other picture where I have scrolled further down the list is the toolbar - as you can see, the intended effect is not being achieved.

buneme avatar Mar 30 '15 17:03 buneme

Im having the same issue... anyone have a solution?

TheGreenBastard avatar Feb 27 '16 22:02 TheGreenBastard