@@ -149,7 +149,6 @@ public static MediaDetailFragment forMedia(int index, boolean editable, boolean
149149 private boolean categoriesPresent = false ;
150150 private boolean depictionLoaded = false ;
151151 private ViewTreeObserver .OnGlobalLayoutListener layoutListener ; // for layout stuff, only used once!
152- private ViewTreeObserver .OnScrollChangedListener scrollListener ;
153152
154153 //Had to make this class variable, to implement various onClicks, which access the media, also I fell why make separate variables when one can serve the purpose
155154 private Media media ;
@@ -211,9 +210,6 @@ && getParentFragment() instanceof MediaDetailPagerFragment) {
211210 authorLayout .setVisibility (GONE );
212211 }
213212
214- // Progressively darken the image in the background when we scroll detail pane up
215- scrollListener = this ::updateTheDarkness ;
216- view .getViewTreeObserver ().addOnScrollChangedListener (scrollListener );
217213 locale = getResources ().getConfiguration ().locale ;
218214 return view ;
219215 }
@@ -313,10 +309,6 @@ public void onDestroyView() {
313309 getView ().getViewTreeObserver ().removeGlobalOnLayoutListener (layoutListener ); // old Android was on crack. CRACK IS WHACK
314310 layoutListener = null ;
315311 }
316- if (scrollListener != null && getView () != null ) {
317- getView ().getViewTreeObserver ().removeOnScrollChangedListener (scrollListener );
318- scrollListener = null ;
319- }
320312
321313 compositeDisposable .clear ();
322314 super .onDestroyView ();
@@ -583,18 +575,6 @@ private View buildCatLabel(final String catName, ViewGroup categoryContainer) {
583575 return item ;
584576 }
585577
586- private void updateTheDarkness () {
587- // You must face the darkness alone
588- int scrollY = scrollView .getScrollY ();
589- int scrollMax = getView ().getHeight ();
590- float scrollPercentage = (float ) scrollY / (float ) scrollMax ;
591- final float transparencyMax = 0.75f ;
592- if (scrollPercentage > transparencyMax ) {
593- scrollPercentage = transparencyMax ;
594- }
595- image .setAlpha (1.0f - scrollPercentage );
596- }
597-
598578 /**
599579 * Returns captions for media details
600580 *
0 commit comments