diff --git a/app/src/main/java/com/github/libretube/activities/MainActivity.kt b/app/src/main/java/com/github/libretube/activities/MainActivity.kt index 92f720ba5..f149862c1 100644 --- a/app/src/main/java/com/github/libretube/activities/MainActivity.kt +++ b/app/src/main/java/com/github/libretube/activities/MainActivity.kt @@ -38,7 +38,6 @@ import com.github.libretube.util.LocaleHelper import com.github.libretube.util.RetrofitInstance import com.github.libretube.util.ThemeHelper import com.google.android.material.color.DynamicColors -import com.google.android.material.color.MaterialColors import com.google.android.material.elevation.SurfaceColors class MainActivity : AppCompatActivity() { @@ -100,7 +99,7 @@ class MainActivity : AppCompatActivity() { navController = findNavController(R.id.fragment) binding.bottomNav.setupWithNavController(navController) - + // gets the surface color of the bottom navigation view val color = SurfaceColors.getColorForElevation(this, 10F) diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index c529b8d16..6fb47e1fc 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -719,7 +719,7 @@ class PlayerFragment : Fragment() { params.height = videoSize.height / videoSize.width * params.width binding.player.layoutParams = params binding.player.requestLayout() - (binding.mainContainer.layoutParams as ConstraintLayout.LayoutParams).apply{ + (binding.mainContainer.layoutParams as ConstraintLayout.LayoutParams).apply { matchConstraintPercentHeight = (videoSize.height / videoSize.width).toFloat() } }