File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed 
android/src/main/java/com/swmansion/rnscreens/bottomsheet Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,15 @@ internal fun <T : View> BottomSheetBehavior<T>.useTwoDetents(
3434internal  fun  <T  :  View > BottomSheetBehavior<T>.useThreeDetents (
3535    @BottomSheetBehavior.StableState  state :  Int?  = null,
3636    firstHeight :  Int?  = null,
37+     thirdHeight :  Int?  = null,
3738    halfExpandedRatio :  Float?  = null,
3839    expandedOffsetFromTop :  Int?  = null,
3940): BottomSheetBehavior <T > {
4041    skipCollapsed =  false 
4142    isFitToContents =  false 
4243    state?.let  { this .state =  state }
4344    firstHeight?.let  { this .peekHeight =  firstHeight }
45+     thirdHeight?.let  { this .maxHeight =  thirdHeight }
4446    halfExpandedRatio?.let  { this .halfExpandedRatio =  halfExpandedRatio }
4547    expandedOffsetFromTop?.let  { this .expandedOffset =  expandedOffsetFromTop }
4648    return  this 
Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ class SheetDelegate(
168168                                    screen.sheetDetents.count(),
169169                                ),
170170                            firstHeight =  (screen.sheetDetents[0 ] *  containerHeight).toInt(),
171+                             thirdHeight =  (screen.sheetDetents[2 ] *  containerHeight).toInt(),
171172                            halfExpandedRatio =  screen.sheetDetents[1 ].toFloat(),
172173                            expandedOffsetFromTop =  ((1  -  screen.sheetDetents[2 ]) *  containerHeight).toInt(),
173174                        )
@@ -229,6 +230,7 @@ class SheetDelegate(
229230                    3  -> 
230231                        behavior.useThreeDetents(
231232                            firstHeight =  (screen.sheetDetents[0 ] *  containerHeight).toInt(),
233+                             thirdHeight =  (screen.sheetDetents[2 ] *  containerHeight).toInt(),
232234                            halfExpandedRatio =  screen.sheetDetents[1 ].toFloat(),
233235                            expandedOffsetFromTop =  ((1  -  screen.sheetDetents[2 ]) *  containerHeight).toInt(),
234236                        )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments