mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-04 19:57:27 +00:00
Added sat and map drawables. Modified map fragment layout.
This commit is contained in:
1 parent
1d219ab841
commit
ad3900a17f
14 files changed
+147
-37
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package com.rtbishop.lookingsat
|
||||
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.view.Menu
|
||||
@@ -55,10 +56,19 @@ class MainActivity : AppCompatActivity() {
|
||||
navView.setupWithNavController(navController)
|
||||
|
||||
navController.addOnDestinationChangedListener { _, destination, _ ->
|
||||
if (destination.id == R.id.nav_sky) {
|
||||
timerLayout.visibility = View.VISIBLE
|
||||
} else {
|
||||
timerLayout.visibility = View.GONE
|
||||
when {
|
||||
destination.id == R.id.nav_sky -> {
|
||||
this.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
toolbar.visibility = View.VISIBLE
|
||||
timerLayout.visibility = View.VISIBLE
|
||||
}
|
||||
destination.id == R.id.nav_map -> {
|
||||
this.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
toolbar.visibility = View.GONE
|
||||
}
|
||||
else -> {
|
||||
timerLayout.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user