mirror of
				https://github.com/KokaKiwi/BarInsta
				synced 2025-10-31 11:35:34 +00:00 
			
		
		
		
	Make Appbar in profile view scrollable
This commit is contained in:
		
							parent
							
								
									c1b113e275
								
							
						
					
					
						commit
						31d02b3e12
					
				| @ -412,18 +412,18 @@ public final class MainHelper implements SwipeRefreshLayout.OnRefreshListener { | ||||
|         // main.mainBinding.profileView.profileInfo.setBackgroundColor(color); | ||||
|         // if (!isBottomToolbar) main.mainBinding.toolbar.toolbar.setBackgroundColor(color); | ||||
| 
 | ||||
|         main.mainBinding.profileView.appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() { | ||||
|             private int height; | ||||
| 
 | ||||
|             @Override | ||||
|             public void onOffsetChanged(final AppBarLayout appBarLayout, final int verticalOffset) { | ||||
|                 if (height == 0) { | ||||
|                     height = main.mainBinding.profileView.profileInfo.getHeight(); | ||||
|                     collapsingToolbar.setMinimumHeight(height); | ||||
|                 } | ||||
|                 main.mainBinding.profileView.profileInfo.setTranslationY(-Math.min(0, verticalOffset)); | ||||
|             } | ||||
|         }); | ||||
|         // main.mainBinding.profileView.appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() { | ||||
|         //     private int height; | ||||
|         // | ||||
|         //     @Override | ||||
|         //     public void onOffsetChanged(final AppBarLayout appBarLayout, final int verticalOffset) { | ||||
|         //         if (height == 0) { | ||||
|         //             height = main.mainBinding.profileView.profileInfo.getHeight(); | ||||
|         //             collapsingToolbar.setMinimumHeight(height); | ||||
|         //         } | ||||
|         //         main.mainBinding.profileView.profileInfo.setTranslationY(-Math.min(0, verticalOffset)); | ||||
|         //     } | ||||
|         // }); | ||||
| 
 | ||||
|         main.setSupportActionBar(main.mainBinding.toolbar.toolbar); | ||||
|         if (isBottomToolbar) { | ||||
|  | ||||
| @ -16,7 +16,7 @@ | ||||
|         <com.google.android.material.appbar.CollapsingToolbarLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             app:layout_scrollFlags="noScroll"> | ||||
|             app:layout_scrollFlags="scroll|enterAlways"> | ||||
| 
 | ||||
|             <RelativeLayout | ||||
|                 android:id="@+id/infoContainer" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user