[Android] Remove useless synthetic usage

Nicolas Pomepuy git at videolan.org
Thu Apr 16 15:43:13 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Mar 24 14:54:30 2020 +0100| [b856a7ce0f8ee5b0fd682f068c2425298be94575] | committer: Nicolas Pomepuy

Remove useless synthetic usage

> https://code.videolan.org/videolan/vlc-android/commit/b856a7ce0f8ee5b0fd682f068c2425298be94575
---

 .../src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt        | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
index ed69b7295..b3ede3328 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
@@ -47,8 +47,6 @@ import com.google.android.material.bottomnavigation.BottomNavigationView
 import com.google.android.material.bottomsheet.BottomSheetBehavior.*
 import com.google.android.material.snackbar.Snackbar
 import com.google.android.material.tabs.TabLayout
-import kotlinx.android.synthetic.main.tab_layout.*
-import kotlinx.android.synthetic.main.toolbar.*
 import kotlinx.coroutines.ExperimentalCoroutinesApi
 import kotlinx.coroutines.ObsoleteCoroutinesApi
 import kotlinx.coroutines.delay
@@ -128,9 +126,9 @@ open class AudioPlayerContainerActivity : BaseActivity() {
         tabLayout = findViewById(R.id.sliding_tabs)
         appBarLayout.setExpanded(true)
         bottomBar = findViewById(R.id.navigation)
-        sliding_tabs?.viewTreeObserver?.addOnGlobalLayoutListener {
+        tabLayout?.viewTreeObserver?.addOnGlobalLayoutListener {
             //add a shadow if there are tabs
-            appbar.elevation = if (sliding_tabs.isVisible()) 4.dp.toFloat() else 0.dp.toFloat()
+            appBarLayout.elevation = if (tabLayout?.isVisible() == true) 4.dp.toFloat() else 0.dp.toFloat()
         }
         audioPlayerContainer = findViewById(R.id.audio_player_container)
     }



More information about the Android mailing list