This commit is contained in:
Bnyro 2022-07-08 18:19:43 +02:00
parent 9563127fed
commit 0c05fead8a
2 changed files with 2 additions and 3 deletions

View File

@ -38,7 +38,6 @@ import com.github.libretube.util.LocaleHelper
import com.github.libretube.util.RetrofitInstance import com.github.libretube.util.RetrofitInstance
import com.github.libretube.util.ThemeHelper import com.github.libretube.util.ThemeHelper
import com.google.android.material.color.DynamicColors import com.google.android.material.color.DynamicColors
import com.google.android.material.color.MaterialColors
import com.google.android.material.elevation.SurfaceColors import com.google.android.material.elevation.SurfaceColors
class MainActivity : AppCompatActivity() { class MainActivity : AppCompatActivity() {
@ -100,7 +99,7 @@ class MainActivity : AppCompatActivity() {
navController = findNavController(R.id.fragment) navController = findNavController(R.id.fragment)
binding.bottomNav.setupWithNavController(navController) binding.bottomNav.setupWithNavController(navController)
// gets the surface color of the bottom navigation view // gets the surface color of the bottom navigation view
val color = SurfaceColors.getColorForElevation(this, 10F) val color = SurfaceColors.getColorForElevation(this, 10F)

View File

@ -719,7 +719,7 @@ class PlayerFragment : Fragment() {
params.height = videoSize.height / videoSize.width * params.width params.height = videoSize.height / videoSize.width * params.width
binding.player.layoutParams = params binding.player.layoutParams = params
binding.player.requestLayout() binding.player.requestLayout()
(binding.mainContainer.layoutParams as ConstraintLayout.LayoutParams).apply{ (binding.mainContainer.layoutParams as ConstraintLayout.LayoutParams).apply {
matchConstraintPercentHeight = (videoSize.height / videoSize.width).toFloat() matchConstraintPercentHeight = (videoSize.height / videoSize.width).toFloat()
} }
} }