From 0c05fead8a56f4d4b7d6ccc75fbee04d4f784e8a Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 8 Jul 2022 18:19:43 +0200 Subject: [PATCH] cleanup --- .../main/java/com/github/libretube/activities/MainActivity.kt | 3 +-- .../main/java/com/github/libretube/fragments/PlayerFragment.kt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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() } }