File tree 1 file changed +8
-5
lines changed
app/src/main/java/com/ricknout/rugbyranker/ui/rankings
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import com.ricknout.rugbyranker.common.ui.SimpleTextWatcher
29
29
import com.ricknout.rugbyranker.util.FlagUtils
30
30
import androidx.core.content.getSystemService
31
31
import androidx.core.os.bundleOf
32
+ import androidx.core.view.doOnLayout
32
33
import androidx.work.State
33
34
import com.google.android.material.snackbar.Snackbar
34
35
import com.ricknout.rugbyranker.vo.RankingsType
@@ -160,12 +161,14 @@ class RankingsFragment : DaggerFragment() {
160
161
}
161
162
})
162
163
if (bottomSheetState != BOTTOM_SHEET_STATE_NONE ) bottomSheetBehavior.state = bottomSheetState
163
- val slideOffset = when (bottomSheetBehavior.state) {
164
- BottomSheetBehavior .STATE_EXPANDED -> 1f
165
- BottomSheetBehavior .STATE_COLLAPSED -> 0f
166
- else -> - 1f
164
+ bottomSheet.doOnLayout {
165
+ val slideOffset = when (bottomSheetBehavior.state) {
166
+ BottomSheetBehavior .STATE_EXPANDED -> 1f
167
+ BottomSheetBehavior .STATE_COLLAPSED -> 0f
168
+ else -> - 1f
169
+ }
170
+ updateAlphaForBottomSheetSlide(slideOffset, hasMatchResults(), isEditingMatchResult())
167
171
}
168
- updateAlphaForBottomSheetSlide(slideOffset, hasMatchResults(), isEditingMatchResult())
169
172
}
170
173
171
174
private fun setupAddOrEditMatchInput () {
You can’t perform that action at this time.
0 commit comments