mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Back2Work commit. Updated deps, added Dagger deps.
This commit is contained in:
1 parent
bfc0561c34
commit
bd61c49ab2
3 files changed
+16
-9
No files matched your search
+5
-1
@@ -1,7 +1,7 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
@@ -56,6 +56,10 @@ dependencies {
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit"
|
||||
|
||||
//dagger
|
||||
implementation "com.google.dagger:dagger:$dagger"
|
||||
kapt "com.google.dagger:dagger-compiler:$dagger"
|
||||
|
||||
// predict4java
|
||||
implementation "com.github.davidmoten:predict4java:$predict4java"
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.navigation.findNavController
|
||||
import androidx.navigation.ui.AppBarConfiguration
|
||||
@@ -85,13 +86,13 @@ class MainActivity : AppCompatActivity() {
|
||||
navView.setupWithNavController(navController)
|
||||
|
||||
navController.addOnDestinationChangedListener { _, destination, _ ->
|
||||
when {
|
||||
destination.id == R.id.nav_sky || destination.id == R.id.nav_single_sat -> {
|
||||
when (destination.id) {
|
||||
R.id.nav_sky, R.id.nav_single_sat -> {
|
||||
this.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
toolbar.visibility = View.VISIBLE
|
||||
timerLayout.visibility = View.VISIBLE
|
||||
}
|
||||
destination.id == R.id.nav_map -> {
|
||||
R.id.nav_map -> {
|
||||
this.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
toolbar.visibility = View.GONE
|
||||
}
|
||||
@@ -103,13 +104,13 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
private fun setupDrawer() {
|
||||
viewModel.debugMessage.observe(this, androidx.lifecycle.Observer { debug_message ->
|
||||
viewModel.debugMessage.observe(this, Observer { debug_message ->
|
||||
if (debug_message != "") {
|
||||
Toast.makeText(this, debug_message, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
})
|
||||
|
||||
viewModel.gsp.observe(this, androidx.lifecycle.Observer { gsp ->
|
||||
viewModel.gsp.observe(this, Observer { gsp ->
|
||||
drawerLat.text = String.format("%.4f", gsp.latitude)
|
||||
drawerLon.text = String.format("%.4f", gsp.longitude)
|
||||
drawerHeight.text = String.format("%.1fm", gsp.heightAMSL)
|
||||
|
||||
+5
-3
@@ -1,7 +1,7 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.50'
|
||||
ext.kotlin_version = '1.3.60'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
@@ -25,7 +25,7 @@ task clean(type: Delete) {
|
||||
}
|
||||
|
||||
ext {
|
||||
material = '1.2.0-alpha01'
|
||||
material = '1.2.0-alpha02'
|
||||
supportLib = '1.0.0'
|
||||
constraintLayout = '1.1.3'
|
||||
|
||||
@@ -33,12 +33,14 @@ ext {
|
||||
preference = '1.1.0'
|
||||
|
||||
navigation = '2.1.0'
|
||||
lifecycle = '2.2.0-rc01'
|
||||
lifecycle = '2.2.0-rc02'
|
||||
work = '2.2.0'
|
||||
room = '2.2.1'
|
||||
|
||||
retrofit = '2.6.2'
|
||||
|
||||
dagger = '2.25.2'
|
||||
|
||||
predict4java = '1.3.1'
|
||||
|
||||
google_play = '17.0.0'
|
||||
|
||||
Reference in new issue
Block a user