2021-12-09 18:01:40 +05:30
|
|
|
package xyz.btcland.libretube
|
|
|
|
|
2021-12-16 03:54:40 +05:30
|
|
|
import android.content.res.Configuration
|
2021-12-09 18:31:47 +05:30
|
|
|
import androidx.appcompat.app.AppCompatActivity
|
2021-12-09 18:01:40 +05:30
|
|
|
import android.os.Bundle
|
2021-12-12 17:38:23 +05:30
|
|
|
import android.widget.FrameLayout
|
2021-12-16 03:54:40 +05:30
|
|
|
import androidx.constraintlayout.motion.widget.MotionLayout
|
2021-12-12 17:38:23 +05:30
|
|
|
import androidx.fragment.app.Fragment
|
2021-12-09 18:31:47 +05:30
|
|
|
import com.google.android.material.bottomnavigation.BottomNavigationView
|
2021-12-09 18:25:32 +05:30
|
|
|
import androidx.navigation.findNavController
|
|
|
|
import androidx.navigation.ui.setupWithNavController
|
2021-12-14 21:45:53 +05:30
|
|
|
import com.google.android.exoplayer2.ExoPlayer
|
2021-12-09 18:01:40 +05:30
|
|
|
|
|
|
|
class MainActivity : AppCompatActivity() {
|
2021-12-14 21:45:53 +05:30
|
|
|
lateinit var exoPlayer:ExoPlayer
|
2021-12-09 18:01:40 +05:30
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
|
super.onCreate(savedInstanceState)
|
|
|
|
setContentView(R.layout.activity_main)
|
2021-12-09 18:25:32 +05:30
|
|
|
val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottomNav)
|
|
|
|
val navController = findNavController(R.id.fragment)
|
|
|
|
bottomNavigationView.setupWithNavController(navController)
|
2021-12-12 17:38:23 +05:30
|
|
|
|
2021-12-09 18:01:40 +05:30
|
|
|
}
|
2021-12-16 03:54:40 +05:30
|
|
|
|
|
|
|
override fun onConfigurationChanged(newConfig: Configuration) {
|
|
|
|
super.onConfigurationChanged(newConfig)
|
|
|
|
val orientation = newConfig.orientation
|
|
|
|
if (orientation == Configuration.ORIENTATION_PORTRAIT)
|
|
|
|
{
|
|
|
|
println("Portrait")
|
|
|
|
//findViewById<MotionLayout>(R.id.playerMotionLayout).getTransition(R.id.yt_transition).isEnabled = true
|
|
|
|
} else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
|
|
|
println("Landscape")
|
|
|
|
//findViewById<MotionLayout>(R.id.playerMotionLayout).getTransition(R.id.yt_transition).isEnabled = false
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2021-12-09 18:01:40 +05:30
|
|
|
}
|