From 85dee46ab2b30abf877e462a7d71b0d9420d2623 Mon Sep 17 00:00:00 2001 From: Jeffrey Chang Date: Mon, 1 Oct 2018 00:17:19 -0700 Subject: [PATCH] Android X refactor --- apk/build.gradle | 4 +-- base/build.gradle | 24 ++++++++--------- .../app/data/models/AnnouncementResponse.kt | 4 +-- .../mhacks/app/data/models/ConfigResponse.kt | 4 +-- .../mhacks/app/data/models/EventsResponse.kt | 3 +-- .../mhacks/app/data/models/FloorResponse.kt | 4 +-- .../java/com/mhacks/app/data/models/Login.kt | 2 +- .../java/com/mhacks/app/data/models/User.kt | 9 ++++--- .../app/data/models/common/TextMessage.kt | 2 +- .../app/data/network/fcm/FCMMessageHandler.kt | 4 +-- .../com/mhacks/app/data/room/Converters.kt | 2 +- .../mhacks/app/data/room/MHacksDatabase.kt | 4 +-- .../app/data/room/dao/AnnouncementDao.kt | 2 +- .../app/data/room/dao/ConfigurationDao.kt | 5 +--- .../com/mhacks/app/data/room/dao/EventDao.kt | 5 +++- .../com/mhacks/app/data/room/dao/LoginDao.kt | 8 +++--- .../mhacks/app/data/room/dao/MapFloorDao.kt | 2 +- .../com/mhacks/app/data/room/dao/UserDao.kt | 8 +++--- build.gradle | 4 +-- gradle/wrapper/gradle-wrapper.properties | 4 +-- ui/build.gradle | 27 +++++++++---------- .../app/adapter/StringMessageAdapter.kt | 2 +- .../mhacks/app/di/MHacksViewModelFactory.kt | 4 +-- .../java/com/mhacks/app/di/ViewModelKey.kt | 2 +- .../java/com/mhacks/app/di/ViewModelModule.kt | 2 +- .../com/mhacks/app/di/module/RoomModule.kt | 3 +-- .../java/com/mhacks/app/extension/View.kt | 4 +-- .../com/mhacks/app/extension/ViewModel.kt | 11 ++++---- .../main/java/com/mhacks/app/mvvm/UseCase.kt | 2 +- .../AnnouncementFragmentModule.kt | 2 +- .../ui/announcement/AnnouncementViewModel.kt | 8 +++--- .../announcement/view/AnnouncementAdapter.kt | 2 +- .../view/AnnouncementDiffCallback.kt | 2 +- .../announcement/view/AnnouncementFragment.kt | 8 +++--- .../view/AnnouncementViewHolder.kt | 2 +- .../com/mhacks/app/ui/common/BaseActivity.kt | 6 ++--- .../app/ui/common/BaseDialogFragment.kt | 4 +-- .../com/mhacks/app/ui/common/ErrorableView.kt | 10 +++---- .../app/ui/common/NavigationFragment.kt | 4 +-- .../app/ui/common/ProgressBarAnimation.kt | 3 +-- .../mhacks/app/ui/common/ProgressBarView.kt | 6 ++--- .../com/mhacks/app/ui/common/ProgressWheel.kt | 2 +- .../app/ui/common/SpacingItemDecoration.kt | 2 +- .../CreateAnnouncementDialogFragment.kt | 4 +-- .../CreateAnnouncementModule.kt | 2 +- .../CreateAnnouncementViewModel.kt | 6 ++--- .../app/ui/events/EventsFragmentModule.kt | 2 +- .../mhacks/app/ui/events/EventsViewModel.kt | 10 +++---- .../ui/events/widget/EventDescriptionItem.kt | 2 +- .../app/ui/events/widget/EventPageFragment.kt | 4 +-- .../app/ui/events/widget/EventTimeLineItem.kt | 4 +-- .../app/ui/events/widget/EventsFragment.kt | 6 ++--- .../ui/events/widget/EventsPagerAdapter.kt | 7 ++--- .../widget/EventsRecyclerViewAdapter.kt | 2 +- .../com/mhacks/app/ui/info/InfoFragment.kt | 2 +- .../java/com/mhacks/app/ui/info/model/Info.kt | 4 +-- .../app/ui/info/widget/CollapsibleCard.kt | 2 +- .../mhacks/app/ui/info/widget/HtmlTextView.kt | 2 +- .../widget/InfoCardRecyclerViewAdapter.kt | 2 +- .../com/mhacks/app/ui/info/widget/Rotate.kt | 2 +- .../com/mhacks/app/ui/main/MainActivity.kt | 9 +++---- .../mhacks/app/ui/main/MainActivityModule.kt | 2 +- .../com/mhacks/app/ui/main/MainViewModel.kt | 8 +++--- .../app/ui/map/MapViewFragmentModule.kt | 2 +- .../com/mhacks/app/ui/map/MapViewModel.kt | 8 +++--- .../app/ui/map/widget/MapViewFragment.kt | 9 ++++--- .../mhacks/app/ui/qrscan/QRScanActivity.kt | 18 ++++++------- .../com/mhacks/app/ui/qrscan/QRScanModule.kt | 2 +- .../mhacks/app/ui/qrscan/QRScanViewModel.kt | 6 ++--- .../ui/qrscan/widget/BarcodeGraphicTracker.kt | 2 +- .../ui/qrscan/widget/camera/CameraSource.kt | 4 +-- .../widget/camera/CameraSourcePreview.kt | 2 +- .../mhacks/app/ui/signin/SignInActivity.kt | 2 +- .../mhacks/app/ui/signin/SignInFragment.kt | 8 +++--- .../app/ui/signin/SignInFragmentModule.kt | 2 +- .../mhacks/app/ui/signin/SignInViewModel.kt | 6 ++--- .../app/ui/ticket/TicketDialogFragment.kt | 2 +- .../app/ui/ticket/TicketDialogModule.kt | 2 +- .../mhacks/app/ui/ticket/TicketViewModel.kt | 8 +++--- .../app/ui/welcome/WelcomeFragmentModule.kt | 2 +- .../mhacks/app/ui/welcome/WelcomeViewModel.kt | 6 ++--- .../app/ui/welcome/widget/WelcomeFragment.kt | 8 +++--- .../FavoriteEventsRecyclerViewAdapter.kt | 2 +- .../java/com/mhacks/app/util/ResourceUtil.kt | 2 +- ui/src/main/res/layout/activity_main.xml | 12 ++++----- ui/src/main/res/layout/activity_qr_scan.xml | 14 +++++----- ui/src/main/res/layout/announcements_item.xml | 8 +++--- .../res/layout/events_description_item.xml | 4 +-- ui/src/main/res/layout/events_pager_view.xml | 2 +- .../main/res/layout/events_timeline_item.xml | 10 +++---- .../res/layout/fragment_announcements.xml | 2 +- ui/src/main/res/layout/fragment_events.xml | 6 ++--- ui/src/main/res/layout/fragment_info.xml | 10 +++---- ui/src/main/res/layout/fragment_signin.xml | 16 +++++------ .../res/layout/fragment_ticket_dialog.xml | 4 +-- ui/src/main/res/layout/fragment_welcome.xml | 8 +++--- ui/src/main/res/layout/item_info.xml | 8 +++--- ui/src/main/res/layout/view_error.xml | 4 +-- ui/src/main/res/layout/view_progress.xml | 4 +-- 99 files changed, 258 insertions(+), 261 deletions(-) diff --git a/apk/build.gradle b/apk/build.gradle index 96f23c7f..1714945c 100644 --- a/apk/build.gradle +++ b/apk/build.gradle @@ -13,7 +13,7 @@ android { versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -36,5 +36,5 @@ dependencies { implementation project(':base') implementation project(':ui') - implementation "com.android.support:support-v4:$google_play_version" + implementation 'androidx.legacy:legacy-support-v4:1.0.0' } diff --git a/base/build.gradle b/base/build.gradle index 449a9812..ada7b23d 100644 --- a/base/build.gradle +++ b/base/build.gradle @@ -12,7 +12,7 @@ ext { android { compileSdkVersion 28 - buildToolsVersion "27.0.3" + buildToolsVersion '28.0.2' baseFeature true dexOptions { javaMaxHeapSize "4g" @@ -63,9 +63,9 @@ android { } } -// dataBinding { -// enabled = true -// } + dataBinding { + enabled = true + } productFlavors { @@ -76,22 +76,22 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlin_version" - kapt 'com.android.databinding:compiler:3.1.4' +// kapt 'androidx.databinding:databinding-compiler:3.2.0' // Play Services implementation 'com.google.firebase:firebase-core:16.0.3' - implementation 'com.google.firebase:firebase-messaging:17.3.1' + implementation 'com.google.firebase:firebase-messaging:17.3.2' - implementation "com.android.support:appcompat-v7:$rootProject.google_play_version" - implementation "com.android.support:support-v4:$rootProject.google_play_version" - implementation "com.android.support:support-media-compat:$rootProject.google_play_version" + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation 'androidx.media:media:1.0.0' // Networking implementation 'com.squareup.retrofit2:converter-moshi:2.4.0' // Persistence - implementation "android.arch.persistence.room:runtime:$rootProject.room_version" - implementation "android.arch.persistence.room:rxjava2:$rootProject.room_version" + implementation 'androidx.room:room-runtime:2.0.0-rc01' + implementation 'androidx.room:room-rxjava2:2.0.0-rc01' // RxJava implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' @@ -101,7 +101,7 @@ dependencies { // Debugging implementation 'com.jakewharton.timber:timber:4.7.0' - kapt "android.arch.persistence.room:compiler:$room_version" + kapt 'androidx.room:room-compiler:2.0.0-rc01' feature project(':ui') } diff --git a/base/src/main/java/com/mhacks/app/data/models/AnnouncementResponse.kt b/base/src/main/java/com/mhacks/app/data/models/AnnouncementResponse.kt index 29e1c102..1da523c2 100644 --- a/base/src/main/java/com/mhacks/app/data/models/AnnouncementResponse.kt +++ b/base/src/main/java/com/mhacks/app/data/models/AnnouncementResponse.kt @@ -1,7 +1,7 @@ package com.mhacks.app.data.models -import android.arch.persistence.room.Entity -import android.arch.persistence.room.PrimaryKey +import androidx.room.Entity +import androidx.room.PrimaryKey import com.squareup.moshi.Json /** diff --git a/base/src/main/java/com/mhacks/app/data/models/ConfigResponse.kt b/base/src/main/java/com/mhacks/app/data/models/ConfigResponse.kt index c2536802..ae8b3e16 100644 --- a/base/src/main/java/com/mhacks/app/data/models/ConfigResponse.kt +++ b/base/src/main/java/com/mhacks/app/data/models/ConfigResponse.kt @@ -1,6 +1,6 @@ package com.mhacks.app.data.models -import android.arch.persistence.room.Entity -import android.arch.persistence.room.PrimaryKey + +import androidx.room.* import com.squareup.moshi.Json /** diff --git a/base/src/main/java/com/mhacks/app/data/models/EventsResponse.kt b/base/src/main/java/com/mhacks/app/data/models/EventsResponse.kt index 83a01328..2b37de09 100644 --- a/base/src/main/java/com/mhacks/app/data/models/EventsResponse.kt +++ b/base/src/main/java/com/mhacks/app/data/models/EventsResponse.kt @@ -1,7 +1,6 @@ package com.mhacks.app.data.models -import android.arch.persistence.room.Entity -import android.arch.persistence.room.PrimaryKey +import androidx.room.* import android.os.Parcel import android.os.Parcelable import com.squareup.moshi.Json diff --git a/base/src/main/java/com/mhacks/app/data/models/FloorResponse.kt b/base/src/main/java/com/mhacks/app/data/models/FloorResponse.kt index 4e69fd1d..a291a44c 100644 --- a/base/src/main/java/com/mhacks/app/data/models/FloorResponse.kt +++ b/base/src/main/java/com/mhacks/app/data/models/FloorResponse.kt @@ -1,6 +1,6 @@ package com.mhacks.app.data.models -import android.arch.persistence.room.Entity -import android.arch.persistence.room.PrimaryKey +import androidx.room.Entity +import androidx.room.PrimaryKey import com.squareup.moshi.Json /** diff --git a/base/src/main/java/com/mhacks/app/data/models/Login.kt b/base/src/main/java/com/mhacks/app/data/models/Login.kt index 833b6c1e..ead4d225 100644 --- a/base/src/main/java/com/mhacks/app/data/models/Login.kt +++ b/base/src/main/java/com/mhacks/app/data/models/Login.kt @@ -4,7 +4,7 @@ package com.mhacks.app.data.models * Model for storing login information. */ -import android.arch.persistence.room.* +import androidx.room.* import com.squareup.moshi.Json @Entity(tableName = "login") diff --git a/base/src/main/java/com/mhacks/app/data/models/User.kt b/base/src/main/java/com/mhacks/app/data/models/User.kt index 08ec9d20..ec00a4e4 100644 --- a/base/src/main/java/com/mhacks/app/data/models/User.kt +++ b/base/src/main/java/com/mhacks/app/data/models/User.kt @@ -1,9 +1,10 @@ package com.mhacks.app.data.models -import android.arch.persistence.room.ColumnInfo -import android.arch.persistence.room.Entity -import android.arch.persistence.room.PrimaryKey -import android.arch.persistence.room.TypeConverters + +import androidx.room.ColumnInfo +import androidx.room.Entity +import androidx.room.PrimaryKey +import androidx.room.TypeConverters import com.mhacks.app.data.room.Converters import com.squareup.moshi.Json diff --git a/base/src/main/java/com/mhacks/app/data/models/common/TextMessage.kt b/base/src/main/java/com/mhacks/app/data/models/common/TextMessage.kt index 18b10a53..40ab6023 100644 --- a/base/src/main/java/com/mhacks/app/data/models/common/TextMessage.kt +++ b/base/src/main/java/com/mhacks/app/data/models/common/TextMessage.kt @@ -1,6 +1,6 @@ package com.mhacks.app.data.models.common -import android.support.annotation.StringRes +import androidx.annotation.StringRes data class TextMessage( @StringRes val textResId: Int?, diff --git a/base/src/main/java/com/mhacks/app/data/network/fcm/FCMMessageHandler.kt b/base/src/main/java/com/mhacks/app/data/network/fcm/FCMMessageHandler.kt index 94c37d76..2d04e2b3 100644 --- a/base/src/main/java/com/mhacks/app/data/network/fcm/FCMMessageHandler.kt +++ b/base/src/main/java/com/mhacks/app/data/network/fcm/FCMMessageHandler.kt @@ -3,8 +3,8 @@ package com.mhacks.app.data.network.fcm import android.app.Notification import android.content.Intent import android.provider.Settings -import android.support.v4.app.NotificationCompat -import android.support.v4.app.NotificationManagerCompat +import androidx.core.app.NotificationCompat +import androidx.core.app.NotificationManagerCompat import com.google.firebase.messaging.FirebaseMessagingService import com.google.firebase.messaging.RemoteMessage import com.mhacks.app.R diff --git a/base/src/main/java/com/mhacks/app/data/room/Converters.kt b/base/src/main/java/com/mhacks/app/data/room/Converters.kt index 85e13b3f..029a7856 100644 --- a/base/src/main/java/com/mhacks/app/data/room/Converters.kt +++ b/base/src/main/java/com/mhacks/app/data/room/Converters.kt @@ -1,6 +1,6 @@ package com.mhacks.app.data.room -import android.arch.persistence.room.TypeConverter +import androidx.room.TypeConverter import com.squareup.moshi.JsonAdapter import com.squareup.moshi.Moshi import com.squareup.moshi.Types diff --git a/base/src/main/java/com/mhacks/app/data/room/MHacksDatabase.kt b/base/src/main/java/com/mhacks/app/data/room/MHacksDatabase.kt index 5b9e2950..822fabeb 100644 --- a/base/src/main/java/com/mhacks/app/data/room/MHacksDatabase.kt +++ b/base/src/main/java/com/mhacks/app/data/room/MHacksDatabase.kt @@ -1,7 +1,7 @@ package com.mhacks.app.data.room -import android.arch.persistence.room.Database -import android.arch.persistence.room.RoomDatabase +import androidx.room.Database +import androidx.room.RoomDatabase import com.mhacks.app.data.models.* import com.mhacks.app.data.room.dao.* diff --git a/base/src/main/java/com/mhacks/app/data/room/dao/AnnouncementDao.kt b/base/src/main/java/com/mhacks/app/data/room/dao/AnnouncementDao.kt index 2eec048b..6a626e65 100644 --- a/base/src/main/java/com/mhacks/app/data/room/dao/AnnouncementDao.kt +++ b/base/src/main/java/com/mhacks/app/data/room/dao/AnnouncementDao.kt @@ -1,6 +1,6 @@ package com.mhacks.app.data.room.dao -import android.arch.persistence.room.* +import androidx.room.* import com.mhacks.app.data.models.Announcement import io.reactivex.Single diff --git a/base/src/main/java/com/mhacks/app/data/room/dao/ConfigurationDao.kt b/base/src/main/java/com/mhacks/app/data/room/dao/ConfigurationDao.kt index d1f209be..9abe9c3f 100644 --- a/base/src/main/java/com/mhacks/app/data/room/dao/ConfigurationDao.kt +++ b/base/src/main/java/com/mhacks/app/data/room/dao/ConfigurationDao.kt @@ -1,9 +1,6 @@ package com.mhacks.app.data.room.dao -import android.arch.persistence.room.Dao -import android.arch.persistence.room.Insert -import android.arch.persistence.room.OnConflictStrategy -import android.arch.persistence.room.Query +import androidx.room.* import com.mhacks.app.data.models.Configuration import io.reactivex.Single diff --git a/base/src/main/java/com/mhacks/app/data/room/dao/EventDao.kt b/base/src/main/java/com/mhacks/app/data/room/dao/EventDao.kt index e6319209..4974270c 100644 --- a/base/src/main/java/com/mhacks/app/data/room/dao/EventDao.kt +++ b/base/src/main/java/com/mhacks/app/data/room/dao/EventDao.kt @@ -1,6 +1,9 @@ package com.mhacks.app.data.room.dao -import android.arch.persistence.room.* + +import android.os.Parcel +import android.os.Parcelable +import androidx.room.* import com.mhacks.app.data.models.Event import io.reactivex.Single diff --git a/base/src/main/java/com/mhacks/app/data/room/dao/LoginDao.kt b/base/src/main/java/com/mhacks/app/data/room/dao/LoginDao.kt index 645e08e4..4d82b4c8 100644 --- a/base/src/main/java/com/mhacks/app/data/room/dao/LoginDao.kt +++ b/base/src/main/java/com/mhacks/app/data/room/dao/LoginDao.kt @@ -1,9 +1,9 @@ package com.mhacks.app.data.room.dao -import android.arch.persistence.room.Dao -import android.arch.persistence.room.Insert -import android.arch.persistence.room.OnConflictStrategy -import android.arch.persistence.room.Query +import androidx.room.Dao +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query import com.mhacks.app.data.models.Login import io.reactivex.Single diff --git a/base/src/main/java/com/mhacks/app/data/room/dao/MapFloorDao.kt b/base/src/main/java/com/mhacks/app/data/room/dao/MapFloorDao.kt index c2f687ce..973e3bae 100644 --- a/base/src/main/java/com/mhacks/app/data/room/dao/MapFloorDao.kt +++ b/base/src/main/java/com/mhacks/app/data/room/dao/MapFloorDao.kt @@ -1,6 +1,6 @@ package com.mhacks.app.data.room.dao -import android.arch.persistence.room.* +import androidx.room.* import com.mhacks.app.data.models.MapFloor import io.reactivex.Single diff --git a/base/src/main/java/com/mhacks/app/data/room/dao/UserDao.kt b/base/src/main/java/com/mhacks/app/data/room/dao/UserDao.kt index 743bfdc0..6bea97fd 100644 --- a/base/src/main/java/com/mhacks/app/data/room/dao/UserDao.kt +++ b/base/src/main/java/com/mhacks/app/data/room/dao/UserDao.kt @@ -1,9 +1,9 @@ package com.mhacks.app.data.room.dao -import android.arch.persistence.room.Dao -import android.arch.persistence.room.Insert -import android.arch.persistence.room.OnConflictStrategy -import android.arch.persistence.room.Query +import androidx.room.Dao +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query import com.mhacks.app.data.models.User import io.reactivex.Single diff --git a/build.gradle b/build.gradle index ac36a4c5..1658bbfb 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { ext { - dagger_version = '2.17' + dagger_version = '2.16' kotlin_version = '1.2.70' anko_version = '0.10.0' room_version = '1.1.1' @@ -16,7 +16,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.4' + classpath 'com.android.tools.build:gradle:3.2.0' classpath 'com.google.gms:google-services:3.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8e6a186f..10f8ec7d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Sep 07 19:14:36 PDT 2018 +#Sun Sep 30 21:55:03 PDT 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip diff --git a/ui/build.gradle b/ui/build.gradle index 1f5f83dd..b81f17db 100644 --- a/ui/build.gradle +++ b/ui/build.gradle @@ -18,14 +18,13 @@ android { versionCode 3 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } @@ -40,7 +39,7 @@ dependencies { testImplementation 'junit:junit:4.12' - kapt 'com.android.databinding:compiler:3.1.4' +// kapt 'androidx.databinding:databinding-compiler:3.2.0' implementation "com.google.dagger:dagger:$rootProject.dagger_version" implementation "com.google.dagger:dagger-android-support:$rootProject.dagger_version" @@ -51,14 +50,14 @@ dependencies { implementation 'com.google.android.gms:play-services-vision:15.0.2' // Support libraries - implementation "com.android.support:appcompat-v7:$rootProject.google_play_version" - implementation "com.android.support:support-v4:$rootProject.google_play_version" - implementation "com.android.support:cardview-v7:$rootProject.google_play_version" - implementation "com.android.support:recyclerview-v7:$rootProject.google_play_version" - implementation "com.android.support:design:$rootProject.google_play_version" + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation 'androidx.cardview:cardview:1.0.0' + implementation 'androidx.recyclerview:recyclerview:1.0.0' + implementation 'com.google.android.material:material:1.0.0' // View - implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2' implementation 'com.github.kenglxn.QRGen:android:2.2.0' implementation 'com.github.vipulasri:timelineview:1.0.5' implementation 'me.dm7.barcodescanner:zxing:1.9.8' @@ -76,8 +75,8 @@ dependencies { implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0' // Persistence - implementation "android.arch.persistence.room:runtime:$rootProject.room_version" - implementation "android.arch.persistence.room:rxjava2:$rootProject.room_version" + implementation 'androidx.room:room-runtime:2.0.0-rc01' + implementation 'androidx.room:room-rxjava2:2.0.0-rc01' // RxJava implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' @@ -85,10 +84,10 @@ dependencies { implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0' // Architecture Components - implementation "android.arch.lifecycle:extensions:$rootProject.lifecycle_version" - implementation "android.arch.lifecycle:reactivestreams:$rootProject.lifecycle_version" + implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' + implementation 'androidx.lifecycle:lifecycle-reactivestreams:2.0.0' - kapt "android.arch.lifecycle:compiler:$rootProject.lifecycle_version" + kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0' // Debugging implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0' diff --git a/ui/src/main/java/com/mhacks/app/adapter/StringMessageAdapter.kt b/ui/src/main/java/com/mhacks/app/adapter/StringMessageAdapter.kt index f35ddb5c..f798b6e5 100644 --- a/ui/src/main/java/com/mhacks/app/adapter/StringMessageAdapter.kt +++ b/ui/src/main/java/com/mhacks/app/adapter/StringMessageAdapter.kt @@ -1,6 +1,6 @@ package com.mhacks.app.adapter -import android.databinding.BindingAdapter +import androidx.databinding.BindingAdapter import com.mhacks.app.data.models.common.TextMessage import com.mhacks.app.ui.common.ProgressWheel diff --git a/ui/src/main/java/com/mhacks/app/di/MHacksViewModelFactory.kt b/ui/src/main/java/com/mhacks/app/di/MHacksViewModelFactory.kt index cbf13368..59fd35c8 100644 --- a/ui/src/main/java/com/mhacks/app/di/MHacksViewModelFactory.kt +++ b/ui/src/main/java/com/mhacks/app/di/MHacksViewModelFactory.kt @@ -1,7 +1,7 @@ package com.mhacks.app.di -import android.arch.lifecycle.ViewModel -import android.arch.lifecycle.ViewModelProvider +import androidx.lifecycle.ViewModel +import androidx.lifecycle.ViewModelProvider import javax.inject.Inject import javax.inject.Provider diff --git a/ui/src/main/java/com/mhacks/app/di/ViewModelKey.kt b/ui/src/main/java/com/mhacks/app/di/ViewModelKey.kt index 0e630939..7dc5a7ec 100644 --- a/ui/src/main/java/com/mhacks/app/di/ViewModelKey.kt +++ b/ui/src/main/java/com/mhacks/app/di/ViewModelKey.kt @@ -1,6 +1,6 @@ package com.mhacks.app.di -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import dagger.MapKey import kotlin.reflect.KClass diff --git a/ui/src/main/java/com/mhacks/app/di/ViewModelModule.kt b/ui/src/main/java/com/mhacks/app/di/ViewModelModule.kt index 12a4ed6b..dce1f954 100644 --- a/ui/src/main/java/com/mhacks/app/di/ViewModelModule.kt +++ b/ui/src/main/java/com/mhacks/app/di/ViewModelModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.di -import android.arch.lifecycle.ViewModelProvider +import androidx.lifecycle.ViewModelProvider import dagger.Binds import dagger.Module diff --git a/ui/src/main/java/com/mhacks/app/di/module/RoomModule.kt b/ui/src/main/java/com/mhacks/app/di/module/RoomModule.kt index 8a62c3da..af2a5b20 100644 --- a/ui/src/main/java/com/mhacks/app/di/module/RoomModule.kt +++ b/ui/src/main/java/com/mhacks/app/di/module/RoomModule.kt @@ -1,9 +1,8 @@ package com.mhacks.app.di.module import android.app.Application -import android.arch.persistence.room.Room +import androidx.room.Room import com.mhacks.app.data.room.MHacksDatabase -import com.mhacks.app.data.room.dao.LoginDao import dagger.Module import dagger.Provides import javax.inject.Singleton diff --git a/ui/src/main/java/com/mhacks/app/extension/View.kt b/ui/src/main/java/com/mhacks/app/extension/View.kt index 86bf0289..974f4c62 100644 --- a/ui/src/main/java/com/mhacks/app/extension/View.kt +++ b/ui/src/main/java/com/mhacks/app/extension/View.kt @@ -1,8 +1,8 @@ package com.mhacks.app.extension -import android.support.annotation.StringRes -import android.support.design.widget.Snackbar import android.view.View +import androidx.annotation.StringRes +import com.google.android.material.snackbar.Snackbar import com.mhacks.app.data.models.common.TextMessage fun View.showSnackBar(duration: Int, textMessage: TextMessage?) { diff --git a/ui/src/main/java/com/mhacks/app/extension/ViewModel.kt b/ui/src/main/java/com/mhacks/app/extension/ViewModel.kt index a00eeda4..2811c14a 100644 --- a/ui/src/main/java/com/mhacks/app/extension/ViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/extension/ViewModel.kt @@ -1,10 +1,11 @@ package com.mhacks.app.extension -import android.arch.lifecycle.ViewModel -import android.arch.lifecycle.ViewModelProvider -import android.arch.lifecycle.ViewModelProviders -import android.support.v4.app.Fragment -import android.support.v7.app.AppCompatActivity +import androidx.appcompat.app.AppCompatActivity +import androidx.fragment.app.Fragment +import androidx.lifecycle.ViewModel +import androidx.lifecycle.ViewModelProvider +import androidx.lifecycle.ViewModelProviders + /** * For Fragments, allows declarations like diff --git a/ui/src/main/java/com/mhacks/app/mvvm/UseCase.kt b/ui/src/main/java/com/mhacks/app/mvvm/UseCase.kt index 0f30bdc6..407f27a2 100644 --- a/ui/src/main/java/com/mhacks/app/mvvm/UseCase.kt +++ b/ui/src/main/java/com/mhacks/app/mvvm/UseCase.kt @@ -1,6 +1,6 @@ package com.mhacks.app.mvvm -import android.arch.lifecycle.MediatorLiveData +import androidx.lifecycle.MediatorLiveData import com.mhacks.app.data.models.Result import com.mhacks.app.data.models.common.RetrofitException import io.reactivex.disposables.CompositeDisposable diff --git a/ui/src/main/java/com/mhacks/app/ui/announcement/AnnouncementFragmentModule.kt b/ui/src/main/java/com/mhacks/app/ui/announcement/AnnouncementFragmentModule.kt index 51e5790d..8b6d52fe 100644 --- a/ui/src/main/java/com/mhacks/app/ui/announcement/AnnouncementFragmentModule.kt +++ b/ui/src/main/java/com/mhacks/app/ui/announcement/AnnouncementFragmentModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.announcement -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.mhacks.app.di.ViewModelKey import dagger.Binds import dagger.Module diff --git a/ui/src/main/java/com/mhacks/app/ui/announcement/AnnouncementViewModel.kt b/ui/src/main/java/com/mhacks/app/ui/announcement/AnnouncementViewModel.kt index c45c0c0f..7dff284c 100644 --- a/ui/src/main/java/com/mhacks/app/ui/announcement/AnnouncementViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/announcement/AnnouncementViewModel.kt @@ -1,9 +1,9 @@ package com.mhacks.app.ui.announcement -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MediatorLiveData -import android.arch.lifecycle.MutableLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.LiveData +import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel import com.mhacks.app.data.models.Announcement import com.mhacks.app.data.models.Result import com.mhacks.app.data.models.common.RetrofitException diff --git a/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementAdapter.kt b/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementAdapter.kt index 349a03b2..d1bde566 100644 --- a/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementAdapter.kt +++ b/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementAdapter.kt @@ -1,10 +1,10 @@ package com.mhacks.app.ui.announcement.view import android.content.Context -import android.support.v7.recyclerview.extensions.ListAdapter import android.text.format.DateUtils import android.view.LayoutInflater import android.view.ViewGroup +import androidx.recyclerview.widget.ListAdapter import com.mhacks.app.data.models.Announcement import org.mhacks.mhacksui.R import java.util.* diff --git a/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementDiffCallback.kt b/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementDiffCallback.kt index 2077e467..7d3f5d68 100644 --- a/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementDiffCallback.kt +++ b/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementDiffCallback.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.announcement.view -import android.support.v7.util.DiffUtil +import androidx.recyclerview.widget.DiffUtil import com.mhacks.app.data.models.Announcement class AnnouncementDiffCallback: DiffUtil.ItemCallback() { diff --git a/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementFragment.kt b/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementFragment.kt index 2f47891f..0eadc6ef 100644 --- a/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementFragment.kt @@ -1,13 +1,13 @@ package com.mhacks.app.ui.announcement.view -import android.arch.lifecycle.Observer -import android.arch.lifecycle.ViewModelProvider import android.os.Bundle -import android.support.design.widget.Snackbar -import android.support.v7.widget.LinearLayoutManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.lifecycle.Observer +import androidx.lifecycle.ViewModelProvider +import androidx.recyclerview.widget.LinearLayoutManager +import com.google.android.material.snackbar.Snackbar import com.mhacks.app.data.models.common.RetrofitException import com.mhacks.app.extension.showSnackBar import com.mhacks.app.extension.viewModelProvider diff --git a/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementViewHolder.kt b/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementViewHolder.kt index 15c87c93..3edcda4b 100644 --- a/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementViewHolder.kt +++ b/ui/src/main/java/com/mhacks/app/ui/announcement/view/AnnouncementViewHolder.kt @@ -1,8 +1,8 @@ package com.mhacks.app.ui.announcement.view -import android.support.v7.widget.RecyclerView import android.view.View import android.widget.TextView +import androidx.recyclerview.widget.RecyclerView import org.mhacks.mhacksui.R /** diff --git a/ui/src/main/java/com/mhacks/app/ui/common/BaseActivity.kt b/ui/src/main/java/com/mhacks/app/ui/common/BaseActivity.kt index 42b13dd1..c5e5311c 100644 --- a/ui/src/main/java/com/mhacks/app/ui/common/BaseActivity.kt +++ b/ui/src/main/java/com/mhacks/app/ui/common/BaseActivity.kt @@ -4,12 +4,12 @@ import android.annotation.SuppressLint import android.annotation.TargetApi import android.graphics.drawable.ColorDrawable import android.os.Build -import android.support.annotation.ColorRes -import android.support.design.widget.Snackbar -import android.support.v4.content.ContextCompat +import androidx.core.content.ContextCompat import android.view.View import android.view.WindowManager import android.widget.Toast +import androidx.annotation.ColorRes +import com.google.android.material.snackbar.Snackbar import com.mhacks.app.data.models.common.TextMessage import org.mhacks.mhacksui.R import com.mhacks.app.util.ResourceUtil diff --git a/ui/src/main/java/com/mhacks/app/ui/common/BaseDialogFragment.kt b/ui/src/main/java/com/mhacks/app/ui/common/BaseDialogFragment.kt index 30572db4..9c006d20 100644 --- a/ui/src/main/java/com/mhacks/app/ui/common/BaseDialogFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/common/BaseDialogFragment.kt @@ -1,12 +1,12 @@ package com.mhacks.app.ui.common import android.os.Bundle -import android.support.annotation.StringRes -import android.support.v4.app.DialogFragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.FrameLayout +import androidx.annotation.StringRes +import androidx.fragment.app.DialogFragment import dagger.android.support.DaggerAppCompatDialogFragment import org.mhacks.mhacksui.R diff --git a/ui/src/main/java/com/mhacks/app/ui/common/ErrorableView.kt b/ui/src/main/java/com/mhacks/app/ui/common/ErrorableView.kt index 18e3e305..12f7f948 100644 --- a/ui/src/main/java/com/mhacks/app/ui/common/ErrorableView.kt +++ b/ui/src/main/java/com/mhacks/app/ui/common/ErrorableView.kt @@ -1,12 +1,12 @@ package com.mhacks.app.ui.common import android.content.Context -import android.support.annotation.ColorInt -import android.support.v4.content.ContextCompat +import androidx.core.content.ContextCompat import android.text.SpannableString import android.text.style.UnderlineSpan import android.util.AttributeSet import android.widget.RelativeLayout +import androidx.annotation.ColorInt import org.mhacks.mhacksui.R import kotlinx.android.synthetic.main.view_error.view.* @@ -26,7 +26,8 @@ class ErrorableView(context: Context, attrs: AttributeSet?) : RelativeLayout(con var titleText: Int = R.string.device_offline set(title) = error_view_error_textview.setText(title) - @ColorInt var textColor: Int? = null + @ColorInt + var textColor: Int? = null set(colorRes) { colorRes?.let { val color = ContextCompat.getColor(context, colorRes) @@ -52,7 +53,4 @@ class ErrorableView(context: Context, attrs: AttributeSet?) : RelativeLayout(con error_view_error_description_textview.text = tryAgainSpan } - fun removeBackground() { - error_view_layout.background = null - } } \ No newline at end of file diff --git a/ui/src/main/java/com/mhacks/app/ui/common/NavigationFragment.kt b/ui/src/main/java/com/mhacks/app/ui/common/NavigationFragment.kt index 3ec1eec5..4e350e32 100644 --- a/ui/src/main/java/com/mhacks/app/ui/common/NavigationFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/common/NavigationFragment.kt @@ -3,9 +3,9 @@ package com.mhacks.app.ui.common import android.content.Context import android.os.Build import android.os.Bundle -import android.support.annotation.ColorRes -import android.support.annotation.StringRes import android.view.View +import androidx.annotation.ColorRes +import androidx.annotation.StringRes import org.mhacks.mhacksui.R /** diff --git a/ui/src/main/java/com/mhacks/app/ui/common/ProgressBarAnimation.kt b/ui/src/main/java/com/mhacks/app/ui/common/ProgressBarAnimation.kt index 6b4eaf39..c45e5c19 100644 --- a/ui/src/main/java/com/mhacks/app/ui/common/ProgressBarAnimation.kt +++ b/ui/src/main/java/com/mhacks/app/ui/common/ProgressBarAnimation.kt @@ -1,10 +1,9 @@ package com.mhacks.app.ui.common -import android.support.v4.view.animation.FastOutSlowInInterpolator import android.view.animation.Animation import android.view.animation.Transformation import android.widget.ProgressBar - +import androidx.interpolator.view.animation.FastOutSlowInInterpolator /** * @param fullDuration - time required to fill progress from 0% to 100% diff --git a/ui/src/main/java/com/mhacks/app/ui/common/ProgressBarView.kt b/ui/src/main/java/com/mhacks/app/ui/common/ProgressBarView.kt index ffbee29f..91b10481 100644 --- a/ui/src/main/java/com/mhacks/app/ui/common/ProgressBarView.kt +++ b/ui/src/main/java/com/mhacks/app/ui/common/ProgressBarView.kt @@ -2,10 +2,10 @@ package com.mhacks.app.ui.common import android.content.Context import android.graphics.Color -import android.support.constraint.ConstraintLayout -import android.support.v4.content.ContextCompat -import org.mhacks.mhacksui.R +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.core.content.ContextCompat import kotlinx.android.synthetic.main.view_progress.view.* +import org.mhacks.mhacksui.R /** * View that displays a progress bar and a message that is the rationale for the progress bar. diff --git a/ui/src/main/java/com/mhacks/app/ui/common/ProgressWheel.kt b/ui/src/main/java/com/mhacks/app/ui/common/ProgressWheel.kt index 50c848cd..bdd35d3c 100644 --- a/ui/src/main/java/com/mhacks/app/ui/common/ProgressWheel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/common/ProgressWheel.kt @@ -6,10 +6,10 @@ import android.graphics.Canvas import android.graphics.Color import android.graphics.Paint import android.graphics.RectF -import android.support.v4.view.animation.FastOutSlowInInterpolator import android.text.TextPaint import android.util.AttributeSet import android.view.View +import androidx.interpolator.view.animation.FastOutSlowInInterpolator import org.mhacks.mhacksui.R class ProgressWheel : View { diff --git a/ui/src/main/java/com/mhacks/app/ui/common/SpacingItemDecoration.kt b/ui/src/main/java/com/mhacks/app/ui/common/SpacingItemDecoration.kt index 7402f61c..ebb06d2b 100644 --- a/ui/src/main/java/com/mhacks/app/ui/common/SpacingItemDecoration.kt +++ b/ui/src/main/java/com/mhacks/app/ui/common/SpacingItemDecoration.kt @@ -2,8 +2,8 @@ package com.mhacks.app.ui.common import android.content.Context import android.graphics.Rect -import android.support.v7.widget.RecyclerView import android.view.View +import androidx.recyclerview.widget.RecyclerView import com.mhacks.app.util.ResourceUtil class SpacingItemDecoration( diff --git a/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementDialogFragment.kt b/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementDialogFragment.kt index f015b57d..c642cf23 100644 --- a/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementDialogFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementDialogFragment.kt @@ -1,8 +1,6 @@ package com.mhacks.app.ui.createannouncement -import android.arch.lifecycle.Observer import android.os.Bundle -import android.support.design.widget.Snackbar import android.text.Editable import android.text.TextWatcher import android.view.LayoutInflater @@ -10,6 +8,8 @@ import android.view.View import android.view.ViewGroup import android.widget.ArrayAdapter import android.widget.Toast +import androidx.lifecycle.Observer +import com.google.android.material.snackbar.Snackbar import com.mhacks.app.data.models.CreateAnnouncement import com.mhacks.app.ui.common.BaseDialogFragment import kotlinx.android.synthetic.main.fragment_create_announcements.* diff --git a/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementModule.kt b/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementModule.kt index d9451cfb..681e21f2 100644 --- a/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementModule.kt +++ b/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.createannouncement -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.mhacks.app.di.ViewModelKey import dagger.Binds import dagger.Module diff --git a/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementViewModel.kt b/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementViewModel.kt index 45dd61f1..ffe8a0ce 100644 --- a/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/createannouncement/CreateAnnouncementViewModel.kt @@ -1,8 +1,8 @@ package com.mhacks.app.ui.createannouncement -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MediatorLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.LiveData +import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.ViewModel import com.mhacks.app.data.models.CreateAnnouncement import com.mhacks.app.data.models.Result import com.mhacks.app.data.models.common.RetrofitException diff --git a/ui/src/main/java/com/mhacks/app/ui/events/EventsFragmentModule.kt b/ui/src/main/java/com/mhacks/app/ui/events/EventsFragmentModule.kt index a3868eda..c6221f0f 100644 --- a/ui/src/main/java/com/mhacks/app/ui/events/EventsFragmentModule.kt +++ b/ui/src/main/java/com/mhacks/app/ui/events/EventsFragmentModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.events -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.mhacks.app.di.ViewModelKey import dagger.Binds import dagger.Module diff --git a/ui/src/main/java/com/mhacks/app/ui/events/EventsViewModel.kt b/ui/src/main/java/com/mhacks/app/ui/events/EventsViewModel.kt index 79c7d8f1..42e2d96f 100644 --- a/ui/src/main/java/com/mhacks/app/ui/events/EventsViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/events/EventsViewModel.kt @@ -1,10 +1,10 @@ package com.mhacks.app.ui.events import android.annotation.SuppressLint -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MediatorLiveData -import android.arch.lifecycle.MutableLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.LiveData +import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel import com.mhacks.app.data.models.Event import com.mhacks.app.data.models.Result import com.mhacks.app.data.models.common.RetrofitException @@ -30,7 +30,7 @@ class EventsViewModel @Inject constructor( private val getFavoriteCachedEventsResult = getFavoriteCachedEventsUseCase.observe() private val _events = MediatorLiveData< - Map>>() + Map>>() val events get() =_events diff --git a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventDescriptionItem.kt b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventDescriptionItem.kt index 7b19b86c..45396380 100644 --- a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventDescriptionItem.kt +++ b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventDescriptionItem.kt @@ -1,8 +1,8 @@ package com.mhacks.app.ui.events.widget import android.content.Context -import android.support.constraint.ConstraintLayout import android.util.AttributeSet +import androidx.constraintlayout.widget.ConstraintLayout import com.mhacks.app.data.models.Event import kotlinx.android.synthetic.main.events_description_item.view.* import org.mhacks.mhacksui.R diff --git a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventPageFragment.kt b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventPageFragment.kt index 4a72d43b..00205ee6 100644 --- a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventPageFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventPageFragment.kt @@ -1,11 +1,11 @@ package com.mhacks.app.ui.events.widget import android.os.Bundle -import android.support.v4.app.Fragment -import android.support.v7.widget.LinearLayoutManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.fragment.app.Fragment +import androidx.recyclerview.widget.LinearLayoutManager import org.mhacks.mhacksui.R import com.mhacks.app.data.models.Event import com.mhacks.app.ui.events.EventsViewModel diff --git a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventTimeLineItem.kt b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventTimeLineItem.kt index 87480fa0..837bb0f6 100644 --- a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventTimeLineItem.kt +++ b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventTimeLineItem.kt @@ -1,12 +1,12 @@ package com.mhacks.app.ui.events.widget import android.content.Context -import android.support.constraint.ConstraintLayout import android.view.ViewGroup +import androidx.constraintlayout.widget.ConstraintLayout import com.mhacks.app.data.models.Event import com.mhacks.app.ui.events.model.EventSectionModel -import org.mhacks.mhacksui.R import kotlinx.android.synthetic.main.events_timeline_item.view.* +import org.mhacks.mhacksui.R /** * Add events TextViews to a Linear Layout diff --git a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsFragment.kt b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsFragment.kt index fb661481..cd4dbb2d 100644 --- a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsFragment.kt @@ -1,13 +1,13 @@ package com.mhacks.app.ui.events.widget -import android.arch.lifecycle.Observer -import android.arch.lifecycle.ViewModelProvider import android.graphics.Color import android.os.Bundle -import android.support.design.widget.Snackbar import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.lifecycle.Observer +import androidx.lifecycle.ViewModelProvider +import com.google.android.material.snackbar.Snackbar import com.mhacks.app.data.models.Event import com.mhacks.app.data.models.common.RetrofitException import com.mhacks.app.extension.showSnackBar diff --git a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsPagerAdapter.kt b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsPagerAdapter.kt index 18f692aa..cb816dbc 100644 --- a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsPagerAdapter.kt +++ b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsPagerAdapter.kt @@ -1,8 +1,9 @@ package com.mhacks.app.ui.events.widget -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v4.app.FragmentPagerAdapter + +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentManager +import androidx.fragment.app.FragmentPagerAdapter import com.mhacks.app.data.models.Event import com.mhacks.app.ui.events.EventsViewModel diff --git a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsRecyclerViewAdapter.kt b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsRecyclerViewAdapter.kt index 9eccd048..71ffdba3 100644 --- a/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsRecyclerViewAdapter.kt +++ b/ui/src/main/java/com/mhacks/app/ui/events/widget/EventsRecyclerViewAdapter.kt @@ -1,8 +1,8 @@ package com.mhacks.app.ui.events.widget import android.content.Context -import android.support.v7.widget.RecyclerView import android.view.ViewGroup +import androidx.recyclerview.widget.RecyclerView import com.mhacks.app.data.models.Event import com.github.vipulasri.timelineview.TimelineView import com.mhacks.app.ui.events.model.EventSectionModel diff --git a/ui/src/main/java/com/mhacks/app/ui/info/InfoFragment.kt b/ui/src/main/java/com/mhacks/app/ui/info/InfoFragment.kt index 9d5a59a1..7ea7395a 100644 --- a/ui/src/main/java/com/mhacks/app/ui/info/InfoFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/info/InfoFragment.kt @@ -4,7 +4,6 @@ import android.content.ActivityNotFoundException import android.content.ComponentName import android.content.Intent import android.os.Bundle -import android.support.v7.widget.LinearLayoutManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -20,6 +19,7 @@ import timber.log.Timber import javax.inject.Inject import android.content.Intent.ACTION_VIEW import android.net.Uri +import androidx.recyclerview.widget.LinearLayoutManager class InfoFragment: NavigationFragment() { diff --git a/ui/src/main/java/com/mhacks/app/ui/info/model/Info.kt b/ui/src/main/java/com/mhacks/app/ui/info/model/Info.kt index b4acbd9a..6137c086 100644 --- a/ui/src/main/java/com/mhacks/app/ui/info/model/Info.kt +++ b/ui/src/main/java/com/mhacks/app/ui/info/model/Info.kt @@ -1,7 +1,7 @@ package com.mhacks.app.ui.info.model -import android.support.annotation.DrawableRes -import android.support.annotation.StringRes +import androidx.annotation.DrawableRes +import androidx.annotation.StringRes data class Info( val type: TYPE, diff --git a/ui/src/main/java/com/mhacks/app/ui/info/widget/CollapsibleCard.kt b/ui/src/main/java/com/mhacks/app/ui/info/widget/CollapsibleCard.kt index 6ea6ae11..ff572393 100644 --- a/ui/src/main/java/com/mhacks/app/ui/info/widget/CollapsibleCard.kt +++ b/ui/src/main/java/com/mhacks/app/ui/info/widget/CollapsibleCard.kt @@ -5,7 +5,6 @@ import android.os.Build.VERSION.SDK_INT import android.os.Build.VERSION_CODES.M import android.os.Parcel import android.os.Parcelable -import android.support.v7.content.res.AppCompatResources import android.transition.Transition import android.transition.TransitionInflater import android.transition.TransitionManager @@ -16,6 +15,7 @@ import android.view.ViewGroup import android.widget.FrameLayout import android.widget.ImageView import android.widget.TextView +import androidx.appcompat.content.res.AppCompatResources import org.mhacks.mhacksui.R class CollapsibleCard @JvmOverloads constructor( diff --git a/ui/src/main/java/com/mhacks/app/ui/info/widget/HtmlTextView.kt b/ui/src/main/java/com/mhacks/app/ui/info/widget/HtmlTextView.kt index cb08a6d2..19659c73 100644 --- a/ui/src/main/java/com/mhacks/app/ui/info/widget/HtmlTextView.kt +++ b/ui/src/main/java/com/mhacks/app/ui/info/widget/HtmlTextView.kt @@ -1,11 +1,11 @@ package com.mhacks.app.ui.info.widget import android.content.Context -import android.support.v7.widget.AppCompatTextView import android.text.Spanned import android.text.style.ClickableSpan import android.util.AttributeSet import android.view.MotionEvent +import androidx.appcompat.widget.AppCompatTextView class HtmlTextView @JvmOverloads constructor( context: Context, diff --git a/ui/src/main/java/com/mhacks/app/ui/info/widget/InfoCardRecyclerViewAdapter.kt b/ui/src/main/java/com/mhacks/app/ui/info/widget/InfoCardRecyclerViewAdapter.kt index c7698102..85db1e1e 100644 --- a/ui/src/main/java/com/mhacks/app/ui/info/widget/InfoCardRecyclerViewAdapter.kt +++ b/ui/src/main/java/com/mhacks/app/ui/info/widget/InfoCardRecyclerViewAdapter.kt @@ -1,8 +1,8 @@ package com.mhacks.app.ui.info.widget -import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup +import androidx.recyclerview.widget.RecyclerView import com.mhacks.app.ui.info.getInfoList import com.mhacks.app.ui.info.model.Info import org.mhacks.mhacksui.databinding.ItemInfoBinding diff --git a/ui/src/main/java/com/mhacks/app/ui/info/widget/Rotate.kt b/ui/src/main/java/com/mhacks/app/ui/info/widget/Rotate.kt index f2006f97..0e1893dd 100644 --- a/ui/src/main/java/com/mhacks/app/ui/info/widget/Rotate.kt +++ b/ui/src/main/java/com/mhacks/app/ui/info/widget/Rotate.kt @@ -4,12 +4,12 @@ package com.mhacks.app.ui.info.widget import android.animation.Animator import android.animation.ObjectAnimator import android.content.Context -import android.support.annotation.Keep import android.transition.Transition import android.transition.TransitionValues import android.util.AttributeSet import android.view.View import android.view.ViewGroup +import androidx.annotation.Keep /** * A [Transition] which animates the rotation of a [View]. diff --git a/ui/src/main/java/com/mhacks/app/ui/main/MainActivity.kt b/ui/src/main/java/com/mhacks/app/ui/main/MainActivity.kt index 1ccbdcb5..9fb9e7f8 100644 --- a/ui/src/main/java/com/mhacks/app/ui/main/MainActivity.kt +++ b/ui/src/main/java/com/mhacks/app/ui/main/MainActivity.kt @@ -1,15 +1,14 @@ package com.mhacks.app.ui.main import android.annotation.SuppressLint -import android.arch.lifecycle.Observer import android.content.Intent -import android.databinding.DataBindingUtil import android.os.Bundle -import android.support.design.widget.BottomNavigationView -import android.support.v4.app.DialogFragment -import android.support.v7.app.AlertDialog import android.view.MenuItem import android.view.View +import androidx.appcompat.app.AlertDialog +import androidx.databinding.DataBindingUtil +import androidx.fragment.app.DialogFragment +import androidx.lifecycle.Observer import androidx.navigation.Navigation import androidx.navigation.ui.NavigationUI import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx diff --git a/ui/src/main/java/com/mhacks/app/ui/main/MainActivityModule.kt b/ui/src/main/java/com/mhacks/app/ui/main/MainActivityModule.kt index 54c46a77..32cb9a30 100644 --- a/ui/src/main/java/com/mhacks/app/ui/main/MainActivityModule.kt +++ b/ui/src/main/java/com/mhacks/app/ui/main/MainActivityModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.main -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.mhacks.app.di.ViewModelKey import dagger.Binds import dagger.Module diff --git a/ui/src/main/java/com/mhacks/app/ui/main/MainViewModel.kt b/ui/src/main/java/com/mhacks/app/ui/main/MainViewModel.kt index f2c1e2e9..1549bf72 100644 --- a/ui/src/main/java/com/mhacks/app/ui/main/MainViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/main/MainViewModel.kt @@ -1,9 +1,9 @@ package com.mhacks.app.ui.main -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MediatorLiveData -import android.arch.lifecycle.ViewModel -import android.arch.persistence.room.EmptyResultSetException +import androidx.lifecycle.LiveData +import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.ViewModel +import androidx.room.EmptyResultSetException import com.mhacks.app.data.models.Login import com.mhacks.app.data.models.Result import com.mhacks.app.data.models.common.RetrofitException diff --git a/ui/src/main/java/com/mhacks/app/ui/map/MapViewFragmentModule.kt b/ui/src/main/java/com/mhacks/app/ui/map/MapViewFragmentModule.kt index ded170dc..19b432e9 100644 --- a/ui/src/main/java/com/mhacks/app/ui/map/MapViewFragmentModule.kt +++ b/ui/src/main/java/com/mhacks/app/ui/map/MapViewFragmentModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.map -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.mhacks.app.di.ViewModelKey import dagger.Binds import dagger.Module diff --git a/ui/src/main/java/com/mhacks/app/ui/map/MapViewModel.kt b/ui/src/main/java/com/mhacks/app/ui/map/MapViewModel.kt index 8f00e287..73fd946e 100644 --- a/ui/src/main/java/com/mhacks/app/ui/map/MapViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/map/MapViewModel.kt @@ -1,10 +1,10 @@ package com.mhacks.app.ui.map -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MediatorLiveData -import android.arch.lifecycle.MutableLiveData -import android.arch.lifecycle.ViewModel import android.graphics.Bitmap +import androidx.lifecycle.LiveData +import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel import com.mhacks.app.data.models.MapFloor import com.mhacks.app.data.models.Result import com.mhacks.app.data.models.common.RetrofitException diff --git a/ui/src/main/java/com/mhacks/app/ui/map/widget/MapViewFragment.kt b/ui/src/main/java/com/mhacks/app/ui/map/widget/MapViewFragment.kt index f00c3550..4d3f6fbd 100644 --- a/ui/src/main/java/com/mhacks/app/ui/map/widget/MapViewFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/map/widget/MapViewFragment.kt @@ -1,20 +1,21 @@ package com.mhacks.app.ui.map.widget import android.Manifest -import android.arch.lifecycle.Observer -import android.arch.lifecycle.ViewModelProvider import android.content.pm.PackageManager import android.os.Bundle -import android.support.design.widget.Snackbar -import android.support.v4.content.ContextCompat +import androidx.core.content.ContextCompat import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.core.app.ActivityCompat.requestPermissions +import androidx.lifecycle.Observer +import androidx.lifecycle.ViewModelProvider import com.google.android.gms.maps.CameraUpdateFactory import com.google.android.gms.maps.GoogleMap import com.google.android.gms.maps.OnMapReadyCallback import com.google.android.gms.maps.SupportMapFragment import com.google.android.gms.maps.model.* +import com.google.android.material.snackbar.Snackbar import com.mhacks.app.data.models.common.RetrofitException import com.mhacks.app.extension.showSnackBar import com.mhacks.app.extension.viewModelProvider diff --git a/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanActivity.kt b/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanActivity.kt index 9bc0bb17..c44d5b36 100644 --- a/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanActivity.kt +++ b/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanActivity.kt @@ -4,8 +4,6 @@ package com.mhacks.app.ui.qrscan import android.Manifest import android.annotation.SuppressLint -import android.arch.lifecycle.Observer -import android.arch.lifecycle.ViewModelProvider import android.content.DialogInterface import android.content.Intent import android.content.IntentFilter @@ -14,22 +12,24 @@ import android.content.res.ColorStateList import android.graphics.Color import android.hardware.Camera import android.os.Bundle -import android.support.annotation.NonNull -import android.support.design.widget.Snackbar -import android.support.v4.app.ActivityCompat -import android.support.v4.content.ContextCompat -import android.support.v4.widget.ImageViewCompat -import android.support.v7.app.AlertDialog +import androidx.core.app.ActivityCompat +import androidx.core.content.ContextCompat +import androidx.core.widget.ImageViewCompat import android.util.Patterns import android.view.GestureDetector import android.view.MotionEvent import android.view.ScaleGestureDetector import android.view.View +import androidx.annotation.NonNull +import androidx.appcompat.app.AlertDialog +import androidx.lifecycle.Observer +import androidx.lifecycle.ViewModelProvider import com.google.android.gms.common.ConnectionResult import com.google.android.gms.common.GoogleApiAvailability import com.google.android.gms.vision.MultiProcessor import com.google.android.gms.vision.barcode.Barcode import com.google.android.gms.vision.barcode.BarcodeDetector +import com.google.android.material.snackbar.Snackbar import com.mhacks.app.extension.viewModelProvider import com.mhacks.app.ui.common.BaseActivity import com.mhacks.app.ui.qrscan.widget.BarcodeGraphic @@ -456,7 +456,7 @@ class QRScanActivity: } - private fun getCamera(@NonNull cameraSource: CameraSource): Camera? { + private fun getCamera(cameraSource: CameraSource): Camera? { val declaredFields = CameraSource::class.java.declaredFields for (field in declaredFields) { if (field.type === Camera::class.java) { diff --git a/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanModule.kt b/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanModule.kt index 2a33858d..a66a2f88 100644 --- a/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanModule.kt +++ b/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.qrscan -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.mhacks.app.di.ViewModelKey import dagger.Binds import dagger.Module diff --git a/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanViewModel.kt b/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanViewModel.kt index 1d2dfd09..8825cfb1 100644 --- a/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanViewModel.kt @@ -1,8 +1,8 @@ package com.mhacks.app.ui.qrscan -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MediatorLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.LiveData +import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.ViewModel import com.mhacks.app.data.models.Feedback import com.mhacks.app.data.models.Result import com.mhacks.app.data.models.common.RetrofitException diff --git a/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/BarcodeGraphicTracker.kt b/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/BarcodeGraphicTracker.kt index 57b889b9..a393079c 100644 --- a/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/BarcodeGraphicTracker.kt +++ b/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/BarcodeGraphicTracker.kt @@ -2,7 +2,7 @@ package com.mhacks.app.ui.qrscan.widget import android.content.Context import com.google.android.gms.vision.barcode.Barcode -import android.support.annotation.UiThread +import androidx.annotation.UiThread import com.google.android.gms.vision.Detector import com.google.android.gms.vision.Tracker import com.mhacks.app.ui.qrscan.widget.camera.GraphicOverlay diff --git a/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/camera/CameraSource.kt b/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/camera/CameraSource.kt index 97ff7225..088f1e4e 100644 --- a/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/camera/CameraSource.kt +++ b/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/camera/CameraSource.kt @@ -16,11 +16,11 @@ import android.hardware.Camera import android.hardware.Camera.CameraInfo import android.os.Build import android.os.SystemClock -import android.support.annotation.RequiresPermission -import android.support.annotation.StringDef import android.view.Surface import android.view.SurfaceHolder import android.view.WindowManager +import androidx.annotation.RequiresPermission +import androidx.annotation.StringDef import com.google.android.gms.common.images.Size import com.google.android.gms.vision.Detector diff --git a/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/camera/CameraSourcePreview.kt b/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/camera/CameraSourcePreview.kt index f553f1a9..faba7cc2 100644 --- a/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/camera/CameraSourcePreview.kt +++ b/ui/src/main/java/com/mhacks/app/ui/qrscan/widget/camera/CameraSourcePreview.kt @@ -4,11 +4,11 @@ import android.Manifest import android.annotation.SuppressLint import android.content.Context import android.content.res.Configuration -import android.support.annotation.RequiresPermission import android.util.AttributeSet import android.view.SurfaceHolder import android.view.SurfaceView import android.view.ViewGroup +import androidx.annotation.RequiresPermission import timber.log.Timber import java.io.IOException diff --git a/ui/src/main/java/com/mhacks/app/ui/signin/SignInActivity.kt b/ui/src/main/java/com/mhacks/app/ui/signin/SignInActivity.kt index 955749c0..105ad4ee 100644 --- a/ui/src/main/java/com/mhacks/app/ui/signin/SignInActivity.kt +++ b/ui/src/main/java/com/mhacks/app/ui/signin/SignInActivity.kt @@ -2,7 +2,7 @@ package com.mhacks.app.ui.signin import android.content.Intent import android.os.Bundle -import android.support.v4.app.Fragment +import androidx.fragment.app.Fragment import org.mhacks.mhacksui.R import com.mhacks.app.ui.common.BaseActivity import com.mhacks.app.ui.main.MainActivity diff --git a/ui/src/main/java/com/mhacks/app/ui/signin/SignInFragment.kt b/ui/src/main/java/com/mhacks/app/ui/signin/SignInFragment.kt index 7f1edfcb..ec3f927d 100644 --- a/ui/src/main/java/com/mhacks/app/ui/signin/SignInFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/signin/SignInFragment.kt @@ -1,14 +1,14 @@ package com.mhacks.app.ui.signin -import android.arch.lifecycle.Observer -import android.arch.lifecycle.ViewModelProvider import android.content.Context import android.os.Bundle -import android.support.design.widget.Snackbar -import android.support.v4.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.fragment.app.Fragment +import androidx.lifecycle.Observer +import androidx.lifecycle.ViewModelProvider +import com.google.android.material.snackbar.Snackbar import com.mhacks.app.data.models.Login import com.mhacks.app.di.module.AuthModule import com.mhacks.app.extension.showSnackBar diff --git a/ui/src/main/java/com/mhacks/app/ui/signin/SignInFragmentModule.kt b/ui/src/main/java/com/mhacks/app/ui/signin/SignInFragmentModule.kt index 08da2ff2..60a931f0 100644 --- a/ui/src/main/java/com/mhacks/app/ui/signin/SignInFragmentModule.kt +++ b/ui/src/main/java/com/mhacks/app/ui/signin/SignInFragmentModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.signin -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.mhacks.app.di.ViewModelKey import com.mhacks.app.ui.signin.SignInViewModel import dagger.Binds diff --git a/ui/src/main/java/com/mhacks/app/ui/signin/SignInViewModel.kt b/ui/src/main/java/com/mhacks/app/ui/signin/SignInViewModel.kt index f2c5ae3b..ec175371 100644 --- a/ui/src/main/java/com/mhacks/app/ui/signin/SignInViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/signin/SignInViewModel.kt @@ -1,8 +1,8 @@ package com.mhacks.app.ui.signin -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MediatorLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.LiveData +import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.ViewModel import com.mhacks.app.data.models.Login import com.mhacks.app.data.models.Result import com.mhacks.app.data.models.common.RetrofitException diff --git a/ui/src/main/java/com/mhacks/app/ui/ticket/TicketDialogFragment.kt b/ui/src/main/java/com/mhacks/app/ui/ticket/TicketDialogFragment.kt index c82bd7af..a0f4bc02 100644 --- a/ui/src/main/java/com/mhacks/app/ui/ticket/TicketDialogFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/ticket/TicketDialogFragment.kt @@ -1,6 +1,5 @@ package com.mhacks.app.ui.ticket -import android.arch.lifecycle.Observer import android.content.Context import android.graphics.Color import android.graphics.drawable.ColorDrawable @@ -8,6 +7,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.lifecycle.Observer import org.mhacks.mhacksui.R import com.mhacks.app.data.models.common.RetrofitException import com.mhacks.app.ui.common.BaseDialogFragment diff --git a/ui/src/main/java/com/mhacks/app/ui/ticket/TicketDialogModule.kt b/ui/src/main/java/com/mhacks/app/ui/ticket/TicketDialogModule.kt index 30a7260a..9be67c3a 100644 --- a/ui/src/main/java/com/mhacks/app/ui/ticket/TicketDialogModule.kt +++ b/ui/src/main/java/com/mhacks/app/ui/ticket/TicketDialogModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.ticket -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.mhacks.app.di.ViewModelKey import dagger.Binds import dagger.Module diff --git a/ui/src/main/java/com/mhacks/app/ui/ticket/TicketViewModel.kt b/ui/src/main/java/com/mhacks/app/ui/ticket/TicketViewModel.kt index fb9ac8e4..c297b723 100644 --- a/ui/src/main/java/com/mhacks/app/ui/ticket/TicketViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/ticket/TicketViewModel.kt @@ -1,9 +1,9 @@ package com.mhacks.app.ui.ticket -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MediatorLiveData -import android.arch.lifecycle.MutableLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.LiveData +import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel import com.mhacks.app.data.models.Result import com.mhacks.app.data.models.User import com.mhacks.app.data.models.common.RetrofitException diff --git a/ui/src/main/java/com/mhacks/app/ui/welcome/WelcomeFragmentModule.kt b/ui/src/main/java/com/mhacks/app/ui/welcome/WelcomeFragmentModule.kt index 076520b9..644d1dfb 100644 --- a/ui/src/main/java/com/mhacks/app/ui/welcome/WelcomeFragmentModule.kt +++ b/ui/src/main/java/com/mhacks/app/ui/welcome/WelcomeFragmentModule.kt @@ -1,6 +1,6 @@ package com.mhacks.app.ui.welcome -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.ViewModel import com.mhacks.app.di.ViewModelKey import com.mhacks.app.ui.events.EventsViewModel import dagger.Binds diff --git a/ui/src/main/java/com/mhacks/app/ui/welcome/WelcomeViewModel.kt b/ui/src/main/java/com/mhacks/app/ui/welcome/WelcomeViewModel.kt index 3b5b5f35..873b0d73 100644 --- a/ui/src/main/java/com/mhacks/app/ui/welcome/WelcomeViewModel.kt +++ b/ui/src/main/java/com/mhacks/app/ui/welcome/WelcomeViewModel.kt @@ -1,9 +1,9 @@ package com.mhacks.app.ui.welcome -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.MediatorLiveData -import android.arch.lifecycle.ViewModel import android.os.CountDownTimer +import androidx.lifecycle.LiveData +import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.ViewModel import com.mhacks.app.data.Constants import com.mhacks.app.data.models.Configuration import com.mhacks.app.data.models.Result diff --git a/ui/src/main/java/com/mhacks/app/ui/welcome/widget/WelcomeFragment.kt b/ui/src/main/java/com/mhacks/app/ui/welcome/widget/WelcomeFragment.kt index 1e7abaef..e16393fd 100644 --- a/ui/src/main/java/com/mhacks/app/ui/welcome/widget/WelcomeFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/welcome/widget/WelcomeFragment.kt @@ -1,13 +1,13 @@ package com.mhacks.app.ui.welcome.widget -import android.arch.lifecycle.Observer -import android.arch.lifecycle.ViewModelProvider import android.os.Bundle -import android.support.design.widget.Snackbar -import android.support.v7.widget.LinearLayoutManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.lifecycle.Observer +import androidx.lifecycle.ViewModelProvider +import androidx.recyclerview.widget.LinearLayoutManager +import com.google.android.material.snackbar.Snackbar import com.mhacks.app.data.models.Event import com.mhacks.app.extension.showSnackBar import com.mhacks.app.extension.viewModelProvider diff --git a/ui/src/main/java/com/mhacks/app/ui/welcome/widget/favoriteevents/FavoriteEventsRecyclerViewAdapter.kt b/ui/src/main/java/com/mhacks/app/ui/welcome/widget/favoriteevents/FavoriteEventsRecyclerViewAdapter.kt index 35095a9d..2c2249ea 100644 --- a/ui/src/main/java/com/mhacks/app/ui/welcome/widget/favoriteevents/FavoriteEventsRecyclerViewAdapter.kt +++ b/ui/src/main/java/com/mhacks/app/ui/welcome/widget/favoriteevents/FavoriteEventsRecyclerViewAdapter.kt @@ -1,10 +1,10 @@ package com.mhacks.app.ui.welcome.widget.favoriteevents -import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView +import androidx.recyclerview.widget.RecyclerView import com.github.vipulasri.timelineview.TimelineView import com.mhacks.app.data.models.Event import com.mhacks.app.ui.events.EventsViewModel diff --git a/ui/src/main/java/com/mhacks/app/util/ResourceUtil.kt b/ui/src/main/java/com/mhacks/app/util/ResourceUtil.kt index 855e9744..1fa6e5a0 100644 --- a/ui/src/main/java/com/mhacks/app/util/ResourceUtil.kt +++ b/ui/src/main/java/com/mhacks/app/util/ResourceUtil.kt @@ -1,8 +1,8 @@ package com.mhacks.app.util import android.content.Context -import android.support.annotation.DimenRes import android.util.TypedValue +import androidx.annotation.DimenRes /** * Created by jeffreychang on 8/6/17. diff --git a/ui/src/main/res/layout/activity_main.xml b/ui/src/main/res/layout/activity_main.xml index 886a6065..52b8196f 100644 --- a/ui/src/main/res/layout/activity_main.xml +++ b/ui/src/main/res/layout/activity_main.xml @@ -4,13 +4,13 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> - - - - + - - + diff --git a/ui/src/main/res/layout/activity_qr_scan.xml b/ui/src/main/res/layout/activity_qr_scan.xml index 93345f8b..2cf6b2b0 100644 --- a/ui/src/main/res/layout/activity_qr_scan.xml +++ b/ui/src/main/res/layout/activity_qr_scan.xml @@ -1,5 +1,5 @@ - - - - - - + - \ No newline at end of file + \ No newline at end of file diff --git a/ui/src/main/res/layout/announcements_item.xml b/ui/src/main/res/layout/announcements_item.xml index abbcc9d8..b29b9eee 100644 --- a/ui/src/main/res/layout/announcements_item.xml +++ b/ui/src/main/res/layout/announcements_item.xml @@ -4,14 +4,14 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> - - @@ -56,7 +56,7 @@ app:layout_constraintRight_toRightOf="parent" tools:text="This is text with a description of where we should definitely put some text haha"/> - - + + \ No newline at end of file diff --git a/ui/src/main/res/layout/events_description_item.xml b/ui/src/main/res/layout/events_description_item.xml index d3016533..cefd7878 100644 --- a/ui/src/main/res/layout/events_description_item.xml +++ b/ui/src/main/res/layout/events_description_item.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/ui/src/main/res/layout/events_pager_view.xml b/ui/src/main/res/layout/events_pager_view.xml index 9c8f620b..48f6e22e 100644 --- a/ui/src/main/res/layout/events_pager_view.xml +++ b/ui/src/main/res/layout/events_pager_view.xml @@ -1,5 +1,5 @@ - - - - - + - \ No newline at end of file + \ No newline at end of file diff --git a/ui/src/main/res/layout/fragment_announcements.xml b/ui/src/main/res/layout/fragment_announcements.xml index f10fb4df..89753d18 100644 --- a/ui/src/main/res/layout/fragment_announcements.xml +++ b/ui/src/main/res/layout/fragment_announcements.xml @@ -4,7 +4,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> - - - - + \ No newline at end of file diff --git a/ui/src/main/res/layout/fragment_info.xml b/ui/src/main/res/layout/fragment_info.xml index 8ed12044..9f385f89 100644 --- a/ui/src/main/res/layout/fragment_info.xml +++ b/ui/src/main/res/layout/fragment_info.xml @@ -1,11 +1,11 @@ - - - - + - + \ No newline at end of file diff --git a/ui/src/main/res/layout/fragment_signin.xml b/ui/src/main/res/layout/fragment_signin.xml index ee00bb41..24dd6c3c 100644 --- a/ui/src/main/res/layout/fragment_signin.xml +++ b/ui/src/main/res/layout/fragment_signin.xml @@ -3,7 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> - - - - + - - - - + + \ No newline at end of file diff --git a/ui/src/main/res/layout/fragment_ticket_dialog.xml b/ui/src/main/res/layout/fragment_ticket_dialog.xml index 385a9812..8f86a820 100644 --- a/ui/src/main/res/layout/fragment_ticket_dialog.xml +++ b/ui/src/main/res/layout/fragment_ticket_dialog.xml @@ -4,7 +4,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> - - + \ No newline at end of file diff --git a/ui/src/main/res/layout/fragment_welcome.xml b/ui/src/main/res/layout/fragment_welcome.xml index 15e435ec..e6cbda71 100644 --- a/ui/src/main/res/layout/fragment_welcome.xml +++ b/ui/src/main/res/layout/fragment_welcome.xml @@ -9,12 +9,12 @@ type="com.mhacks.app.ui.welcome.WelcomeViewModel" /> - - - - + \ No newline at end of file diff --git a/ui/src/main/res/layout/item_info.xml b/ui/src/main/res/layout/item_info.xml index 9a8995ae..dfa617fc 100644 --- a/ui/src/main/res/layout/item_info.xml +++ b/ui/src/main/res/layout/item_info.xml @@ -5,11 +5,11 @@ xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"> - - @@ -63,7 +63,7 @@ app:layout_constraintTop_toBottomOf="@id/item_info_sub_header_text_view" tools:text="@string/info_wifi_desc" /> - - + + \ No newline at end of file diff --git a/ui/src/main/res/layout/view_error.xml b/ui/src/main/res/layout/view_error.xml index ff48ffc1..96186e90 100644 --- a/ui/src/main/res/layout/view_error.xml +++ b/ui/src/main/res/layout/view_error.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/ui/src/main/res/layout/view_progress.xml b/ui/src/main/res/layout/view_progress.xml index 6c1398e3..56104967 100644 --- a/ui/src/main/res/layout/view_progress.xml +++ b/ui/src/main/res/layout/view_progress.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file