diff --git a/app/build.gradle b/app/build.gradle index 0377af6..15fd828 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'kotlin-android' - id 'kotlin-kapt' + id 'com.google.devtools.ksp' } def keystorePropertiesFile = rootProject.file("key.properties") @@ -25,7 +25,7 @@ android { buildFeatures { viewBinding true - dataBinding true + dataBinding false } splits { // Configures multiple APKs based on ABI. @@ -85,16 +85,16 @@ android { dependencies { - implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.core:core-ktx:1.13.1' implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.9.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation "androidx.activity:activity-ktx:1.7.2" - implementation 'androidx.databinding:databinding-runtime:8.0.2' + implementation 'androidx.activity:activity-ktx:1.9.0' + implementation 'androidx.databinding:databinding-runtime:8.4.1' - def lifecycle_version = "2.6.1" + def lifecycle_version = '2.8.0' // LiveData implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" @@ -103,12 +103,12 @@ dependencies { implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version" - def room_version = "2.6.0-alpha01" + def room_version = '2.6.1' implementation "androidx.room:room-runtime:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version" - implementation "androidx.room:room-ktx:2.5.1" - kapt "androidx.room:room-compiler:$room_version" + implementation 'androidx.room:room-ktx:2.6.1' + ksp "androidx.room:room-compiler:$room_version" testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' diff --git a/app/src/main/java/com/maary/liveinpeace/HistoryActivity.kt b/app/src/main/java/com/maary/liveinpeace/HistoryActivity.kt index e9ec9ee..19043be 100644 --- a/app/src/main/java/com/maary/liveinpeace/HistoryActivity.kt +++ b/app/src/main/java/com/maary/liveinpeace/HistoryActivity.kt @@ -5,7 +5,6 @@ import android.view.View import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity import androidx.core.view.WindowCompat -import androidx.databinding.DataBindingUtil import androidx.recyclerview.widget.LinearLayoutManager import com.google.android.material.datepicker.CalendarConstraints import com.google.android.material.datepicker.DateValidatorPointBackward @@ -61,7 +60,7 @@ class HistoryActivity : AppCompatActivity(), DeviceMapChangeListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) WindowCompat.setDecorFitsSystemWindows(window, false) - binding = DataBindingUtil.setContentView(this, R.layout.activity_history) + binding = ActivityHistoryBinding.inflate(layoutInflater) setContentView(binding.root) var pickedDate : String = LocalDate.now().toString() diff --git a/app/src/main/res/layout/activity_history.xml b/app/src/main/res/layout/activity_history.xml index 2fa8e22..86219f4 100644 --- a/app/src/main/res/layout/activity_history.xml +++ b/app/src/main/res/layout/activity_history.xml @@ -1,105 +1,105 @@ - - + + + android:layout_height="wrap_content" + android:background="?attr/colorSurfaceContainerHighest" + android:fitsSystemWindows="true" + app:liftOnScroll="true"> - + android:layout_height="?attr/collapsingToolbarLayoutLargeSize" + app:contentScrim="?attr/colorSurfaceContainerHighest" + app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"> - + - + - + - + android:background="@android:color/transparent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:selectionRequired="true" + app:singleSelection="true"> - -