Browse Source

ui fixes, loading progressbar switched to livedata

mikhail 2 months ago
parent
commit
91b671a83a

+ 11 - 0
.idea/misc.xml

@@ -1,5 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
+  <component name="DesignSurface">
+    <option name="filePathToZoomLevelMap">
+      <map>
+        <entry key="app/src/main/res/drawable/ic_baseline_dialer_sip_24_white.xml" value="0.1734375" />
+        <entry key="app/src/main/res/layout/fragment_calls.xml" value="0.15729166666666666" />
+        <entry key="app/src/main/res/layout/item_unit.xml" value="0.33" />
+        <entry key="app/src/main/res/layout/item_user.xml" value="0.33" />
+        <entry key="app/src/main/res/layout/search_item.xml" value="0.5" />
+      </map>
+    </option>
+  </component>
   <component name="ExternalStorageConfigurationManager" enabled="true" />
   <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
 </project>

+ 18 - 32
app/build.gradle

@@ -4,6 +4,8 @@ plugins {
     id 'org.jetbrains.kotlin.plugin.serialization'
     id 'androidx.navigation.safeargs'
     id "org.jetbrains.kotlin.kapt"
+    id 'com.google.gms.google-services'
+    id 'com.google.firebase.crashlytics'
 }
 
 android {
@@ -13,8 +15,8 @@ android {
         applicationId "ru.mephi.voip"
         minSdk 21
         targetSdk 31
-        versionCode 1
-        versionName "1.0"
+        versionCode 2
+        versionName "2"
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
@@ -23,6 +25,7 @@ android {
         release {
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+            debuggable = false
         }
     }
 
@@ -51,6 +54,7 @@ dependencies {
     implementation 'androidx.appcompat:appcompat:1.3.1'
     implementation 'com.google.android.material:material:1.4.0'
     implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
+    implementation 'androidx.compose.material:material:1.0.5'
 
     implementation  "org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.0"
     implementation  "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0"
@@ -60,24 +64,16 @@ dependencies {
 
     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30"
 
-//    implementation  "io.insert-koin:koin-core:3.1.2"
     implementation  "io.insert-koin:koin-android:3.1.2"
     implementation  "io.insert-koin:koin-androidx-compose:3.1.2"
 
     implementation  "androidx.room:room-ktx:2.3.0"
-    implementation 'androidx.compose.material:material:1.0.4'
     kapt "androidx.room:room-compiler:2.3.0"
     coreLibraryDesugaring  "com.android.tools:desugar_jdk_libs:1.1.5"
 
     implementation  "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
 
-
-    implementation "androidx.core:core-ktx:1.6.0" 
-    implementation "androidx.appcompat:appcompat:1.3.1" 
-    implementation "androidx.constraintlayout:constraintlayout:2.1.1" 
-    implementation "com.google.android.material:material:1.4.0" 
-
-    implementation "androidx.recyclerview:recyclerview:1.2.1" 
+    implementation "androidx.recyclerview:recyclerview:1.2.1"
     implementation "com.github.xabaras:RecyclerViewSwipeDecorator:1.3" 
 
     implementation "androidx.navigation:navigation-fragment-ktx:2.3.5" 
@@ -85,34 +81,23 @@ dependencies {
     implementation "androidx.navigation:navigation-runtime-ktx:2.3.5" 
 
     implementation "androidx.lifecycle:lifecycle-extensions:2.2.0" 
-    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1" 
-    implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1" 
-    implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1" 
+    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0"
+    implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.0"
+    implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.0"
+    implementation 'androidx.compose.runtime:runtime-livedata:1.1.0-beta02'
 
     implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2" 
-    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2-native-mt" 
+    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"
 
     debugImplementation "org.kodein.db:kodein-db-android-debug:0.8.1-beta" 
     releaseImplementation "org.kodein.db:kodein-db-android:0.8.1-beta" 
     implementation "org.kodein.db:kodein-db-serializer-kotlinx:0.8.1-beta" 
 
-    implementation "androidx.annotation:annotation:1.2.0" 
-
-    implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.2" 
-
-    implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
-    kapt "com.squareup.moshi:moshi-kotlin-codegen:1.12.0"
-    implementation "com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2" 
-
-    implementation "com.jakewharton.timber:timber:5.0.1" 
-
+    implementation "com.jakewharton.timber:timber:5.0.1"
     implementation "androidx.preference:preference-ktx:1.1.1"
 
-    implementation 'androidx.compose.runtime:runtime-livedata:1.1.0-beta01'
-
     implementation "com.vmadalin:easypermissions-ktx:1.0.0" 
-    implementation "com.rbddevs.splashy:splashy:1.3.0" 
-    implementation "com.polyak:icon-switch:1.0.0" 
+    implementation "com.polyak:icon-switch:1.0.0"
     implementation "io.ktor:ktor-client-okhttp:1.6.2"  
     implementation "io.ktor:ktor-client-serialization:1.6.2"  
     implementation "io.ktor:ktor-client-core:1.6.2"  
@@ -120,8 +105,9 @@ dependencies {
 
     implementation 'com.github.leonardoxh:keystore-ultimate:1.3.0'
 
+    implementation platform('com.google.firebase:firebase-bom:29.0.0')
+    implementation 'com.google.firebase:firebase-analytics-ktx'
+    implementation 'com.google.firebase:firebase-crashlytics-ktx'
+
     implementation files("aars/abto_android_voip_sdk.aar")
-    // Unused in KMM
-    implementation "com.squareup.moshi:moshi-kotlin:1.12.0" 
-    
 }

+ 127 - 0
app/google-services.json

@@ -0,0 +1,127 @@
+{
+  "project_info": {
+    "project_number": "58450429294",
+    "firebase_url": "https://corporatemephi-4e794.firebaseio.com",
+    "project_id": "corporatemephi-4e794",
+    "storage_bucket": "corporatemephi-4e794.appspot.com"
+  },
+  "client": [
+    {
+      "client_info": {
+        "mobilesdk_app_id": "1:58450429294:android:8776dd927685b35238ed7f",
+        "android_client_info": {
+          "package_name": "com.mephi.corporatemephi"
+        }
+      },
+      "oauth_client": [
+        {
+          "client_id": "58450429294-6vjkgjd4om76jhiditkkpbcij3ath42o.apps.googleusercontent.com",
+          "client_type": 1,
+          "android_info": {
+            "package_name": "com.mephi.corporatemephi",
+            "certificate_hash": "0620c0c94f5d226673df56bcac9f07d3c7b9e815"
+          }
+        },
+        {
+          "client_id": "58450429294-qvueuo1olqo9v61b0essi439o04nm6k1.apps.googleusercontent.com",
+          "client_type": 3
+        }
+      ],
+      "api_key": [
+        {
+          "current_key": "AIzaSyDMcZjmkVIA0MLVSNTZes4_YoUJZfqsHm0"
+        }
+      ],
+      "services": {
+        "appinvite_service": {
+          "other_platform_oauth_client": [
+            {
+              "client_id": "58450429294-qvueuo1olqo9v61b0essi439o04nm6k1.apps.googleusercontent.com",
+              "client_type": 3
+            },
+            {
+              "client_id": "58450429294-strio8ed3961e36volpqgf956avkpdki.apps.googleusercontent.com",
+              "client_type": 2,
+              "ios_info": {
+                "bundle_id": "com.mephi.corporatemephi"
+              }
+            }
+          ]
+        }
+      }
+    },
+    {
+      "client_info": {
+        "mobilesdk_app_id": "1:58450429294:android:97d8c3a82c31319b38ed7f",
+        "android_client_info": {
+          "package_name": "com.mephi.corporatemephi.debug"
+        }
+      },
+      "oauth_client": [
+        {
+          "client_id": "58450429294-qvueuo1olqo9v61b0essi439o04nm6k1.apps.googleusercontent.com",
+          "client_type": 3
+        }
+      ],
+      "api_key": [
+        {
+          "current_key": "AIzaSyDMcZjmkVIA0MLVSNTZes4_YoUJZfqsHm0"
+        }
+      ],
+      "services": {
+        "appinvite_service": {
+          "other_platform_oauth_client": [
+            {
+              "client_id": "58450429294-qvueuo1olqo9v61b0essi439o04nm6k1.apps.googleusercontent.com",
+              "client_type": 3
+            },
+            {
+              "client_id": "58450429294-strio8ed3961e36volpqgf956avkpdki.apps.googleusercontent.com",
+              "client_type": 2,
+              "ios_info": {
+                "bundle_id": "com.mephi.corporatemephi"
+              }
+            }
+          ]
+        }
+      }
+    },
+    {
+      "client_info": {
+        "mobilesdk_app_id": "1:58450429294:android:702d31f1cf05dcb438ed7f",
+        "android_client_info": {
+          "package_name": "ru.mephi.voip"
+        }
+      },
+      "oauth_client": [
+        {
+          "client_id": "58450429294-qvueuo1olqo9v61b0essi439o04nm6k1.apps.googleusercontent.com",
+          "client_type": 3
+        }
+      ],
+      "api_key": [
+        {
+          "current_key": "AIzaSyDMcZjmkVIA0MLVSNTZes4_YoUJZfqsHm0"
+        }
+      ],
+      "services": {
+        "appinvite_service": {
+          "other_platform_oauth_client": [
+            {
+              "client_id": "58450429294-qvueuo1olqo9v61b0essi439o04nm6k1.apps.googleusercontent.com",
+              "client_type": 3
+            },
+            {
+              "client_id": "58450429294-strio8ed3961e36volpqgf956avkpdki.apps.googleusercontent.com",
+              "client_type": 2,
+              "ios_info": {
+                "bundle_id": "com.mephi.corporatemephi"
+              }
+            }
+          ]
+        }
+      }
+    }
+  ],
+  "configuration_version": "1"
+}

+ 2 - 16
app/src/main/AndroidManifest.xml

@@ -24,23 +24,9 @@
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
 
     <uses-feature
-        android:name="android.software.sip"
-        android:required="true" />
+        android:name="android.hardware.camera"
+        android:required="false" />
 
-    <!-- Убедимся, что у устройства есть микрофон и оно может звонить по sip. -->
-    <uses-feature
-        android:name="android.software.sip.voip"
-        android:required="true" />
-    <uses-feature
-        android:name="android.hardware.wifi"
-        android:required="true" />
-    <uses-feature
-        android:name="android.hardware.microphone"
-        android:required="true" />
-    <uses-feature
-        android:name="android.hardware.sip.voip"
-        android:required="true" />
-    <!--        android:name="org.abtollc.sdk.AbtoNotificationApplication"-->
     <application
         android:requestLegacyExternalStorage="true"
         android:name=".VoIPApplication"

+ 1 - 1
app/src/main/java/ru/mephi/voip/data/encryption/EncryptUtils.kt

@@ -5,7 +5,7 @@ import com.github.leonardoxh.keystore.CipherStorageFactory
 import ru.mephi.voip.appContext
 
 object EncryptUtils {
-    var cipherStorage: CipherStorage = CipherStorageFactory.newInstance(appContext)
+    private var cipherStorage: CipherStorage = CipherStorageFactory.newInstance(appContext)
     fun encrypt(input: String) = cipherStorage.encrypt("passwords", input)
     fun decrypt() = cipherStorage.decrypt("passwords")
 }

+ 7 - 2
app/src/main/java/ru/mephi/voip/ui/MainActivity.kt

@@ -15,6 +15,9 @@ import androidx.core.app.NotificationCompat
 import androidx.lifecycle.LiveData
 import androidx.navigation.NavController
 import androidx.preference.PreferenceManager
+import com.google.firebase.analytics.FirebaseAnalytics
+import com.google.firebase.analytics.ktx.analytics
+import com.google.firebase.ktx.Firebase
 import com.vmadalin.easypermissions.EasyPermissions
 import org.abtollc.sdk.*
 import org.abtollc.sdk.OnInitializeListener.InitializeState
@@ -31,12 +34,12 @@ class MainActivity : NetworkSensingBaseActivity(), OnInitializeListener, OnRegis
     private lateinit var binding: ActivityMainBinding
     private val REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS = 124
 
+    private lateinit var firebaseAnalytics: FirebaseAnalytics
+
     companion object {
         lateinit var abtoPhone: AbtoPhone
     }
 
-    private var account: Account? = null
-
     private var currentNavController: LiveData<NavController>? = null
 
     private lateinit var sp: SharedPreferences
@@ -64,6 +67,8 @@ class MainActivity : NetworkSensingBaseActivity(), OnInitializeListener, OnRegis
         binding = ActivityMainBinding.inflate(layoutInflater)
         setContentView(binding.root)
 
+        firebaseAnalytics = Firebase.analytics
+
         if (!hasPermissions())
             requestPermissions()
 

+ 20 - 13
app/src/main/java/ru/mephi/voip/ui/catalog/CatalogFragment.kt

@@ -63,6 +63,16 @@ class CatalogFragment : Fragment(),
         if (viewModel.catalogStack.isEmpty())
             initMainPageObserver()
 
+        viewModel.isLoadingActiveLiveData.observe(viewLifecycleOwner, {
+            if (it == true) {
+                binding.rv.visibility = View.GONE
+                binding.progressBar.visibility = View.VISIBLE
+            } else {
+                binding.rv.visibility = View.VISIBLE
+                binding.progressBar.visibility = View.GONE
+            }
+        })
+
         return binding.root
     }
 
@@ -72,10 +82,11 @@ class CatalogFragment : Fragment(),
 
         requireActivity().onBackPressedDispatcher.addCallback(this) {
             viewModel.goBack()
+            viewModel.stopLoadingAnimation()
+
             if (viewModel.catalogStack.isEmpty())
                 requireActivity().finish()
         }
-
     }
 
     override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@@ -230,19 +241,16 @@ class CatalogFragment : Fragment(),
             override fun onDataChanged(status: Status) {
                 when (status) {
                     Status.SUCCESS -> {
-                        binding.rv.visibility = View.VISIBLE
-                        binding.progressBar.visibility = View.GONE
+                        viewModel.stopLoadingAnimation()
                         retrieveCatalog()
                     }
 
                     Status.ERROR -> {
-                        binding.rv.visibility = View.VISIBLE
-                        binding.progressBar.visibility = View.GONE
+                        viewModel.stopLoadingAnimation()
                     }
 
                     Status.LOADING -> {
-                        binding.progressBar.visibility = View.VISIBLE
-                        binding.rv.visibility = View.GONE
+                        viewModel.startLoadingAnimation()
                     }
                 }
             }
@@ -305,8 +313,8 @@ class CatalogFragment : Fragment(),
             it.let { resource ->
                 when (resource.status) {
                     Status.SUCCESS -> {
-                        binding.rv.visibility = View.VISIBLE
-                        binding.progressBar.visibility = View.GONE
+                        viewModel.stopLoadingAnimation()
+
                         resource.data?.let { unit ->
                             viewModel.catalogStack.push(unit[0])
                             viewModel.catalogLiveData!!.postValue(viewModel.catalogStack)
@@ -316,8 +324,8 @@ class CatalogFragment : Fragment(),
                         }
                     }
                     Status.ERROR -> {
-                        binding.rv.visibility = View.VISIBLE
-                        binding.progressBar.visibility = View.GONE
+                        viewModel.stopLoadingAnimation()
+
                         val unit =
                             viewModel.repository.catalogCacheDao.getAll()
                                 .find { unit -> unit.code_str == "01 000 00" }
@@ -331,8 +339,7 @@ class CatalogFragment : Fragment(),
                         toast(it.message)
                     }
                     Status.LOADING -> {
-                        binding.progressBar.visibility = View.VISIBLE
-                        binding.rv.visibility = View.GONE
+                        viewModel.startLoadingAnimation()
                     }
                 }
             }

+ 6 - 5
app/src/main/java/ru/mephi/voip/ui/catalog/CatalogViewModel.kt

@@ -4,10 +4,7 @@ import android.app.Application
 import android.os.Handler
 import android.os.Looper
 import android.widget.Toast
-import androidx.lifecycle.AndroidViewModel
-import androidx.lifecycle.MutableLiveData
-import androidx.lifecycle.liveData
-import androidx.lifecycle.viewModelScope
+import androidx.lifecycle.*
 import kotlinx.coroutines.Dispatchers
 import kotlinx.coroutines.launch
 import ru.mephi.voip.VoIPApplication
@@ -24,6 +21,11 @@ class CatalogViewModel(app: Application, val repository: CatalogRepository) :
     var catalogLiveData: MutableLiveData<Stack<UnitM>>? = null
     var breadcrumbStack: Stack<UnitM> = Stack()
     var breadcrumbLiveData: MutableLiveData<Stack<UnitM>>? = null
+    private var _isLoadingActiveLiveData: MutableLiveData<Boolean> = MutableLiveData<Boolean>()
+    var isLoadingActiveLiveData: LiveData<Boolean> = _isLoadingActiveLiveData
+
+    fun stopLoadingAnimation() = _isLoadingActiveLiveData.postValue(false)
+    fun startLoadingAnimation() = _isLoadingActiveLiveData.postValue(true)
 
     fun getCatalogMutableLiveData() = catalogLiveData
     fun getBreadcrumbMutableLiveData() = breadcrumbLiveData
@@ -36,7 +38,6 @@ class CatalogViewModel(app: Application, val repository: CatalogRepository) :
 
     init {
         init()
-        //https://futurestud.io/tutorials/retrofit-2-how-to-add-query-parameters-to-every-request
     }
 
     private fun init() {

+ 1 - 0
app/src/main/java/ru/mephi/voip/ui/catalog/adapter/BreadcrumbsAdapter.kt

@@ -21,6 +21,7 @@ class BreadcrumbsAdapter(
             val unit = units[position]
             binding.nameTextView.text = unit.shortname
             binding.root.setOnClickListener {
+                viewModel.stopLoadingAnimation()
                 viewModel.breadcrumbStack.popFromStackTill(unit)
                 viewModel.breadcrumbLiveData!!.postValue(viewModel.breadcrumbStack)
                 viewModel.catalogStack.popFromStackTill(unit)

+ 1 - 4
app/src/main/java/ru/mephi/voip/ui/catalog/adapter/DataAdapter.kt

@@ -163,7 +163,7 @@ class DataAdapter(
                     binding.appointmentNameText.visibility = View.VISIBLE
                     binding.appointmentNameTitle.visibility = View.VISIBLE
                     binding.appointmentNameText.text =
-                        item.appointment!!.split(",").let {
+                        item.appointment.split(",").let {
                             if (it.size == 1) it.joinToString()
                             else it.mapIndexed { index, s ->
                                 "${index + 1}. $s\n"
@@ -175,14 +175,11 @@ class DataAdapter(
                 if (item.email.isNullOrEmpty()
                     && item.room.isNullOrEmpty()
                     && item.line.isNullOrEmpty()
-                // TODO подразделение ещё должно быть
                 )
                     binding.viewMoreBtn.visibility = View.GONE
                 else
                     binding.viewMoreBtn.visibility = View.VISIBLE
 
-                // Проверка отдельных эл-тов в дополнительной информации
-
                 // Почта
                 if (item.email.isNullOrEmpty()) {
                     binding.layoutEmail.visibility = View.GONE

+ 5 - 0
app/src/main/java/ru/mephi/voip/ui/profile/ProfileViewModel.kt

@@ -97,6 +97,11 @@ class ProfileViewModel(app: Application, override var sp: SharedPreferences) :
     fun addNewAccount() {
         val list = getAllAccounts()
 
+//        firebaseAnalytics.logEvent("share_image") {
+//            param("image_name", name)
+//            param("full_text", text)
+//        }
+
         list.forEach { it.isActive = false }
 
         list.add(

+ 1 - 1
app/src/main/res/drawable/ic_baseline_dialer_sip_24_white.xml

@@ -1,7 +1,7 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
     android:width="24dp"
     android:height="24dp"
-    android:tint="@color/white"
+    android:tint="@android:color/white"
     android:viewportWidth="24"
     android:viewportHeight="24">
     <path

+ 1 - 1
app/src/main/res/layout/fragment_calls.xml

@@ -32,7 +32,7 @@
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
                     android:text="VoIP Телефон"
-                    android:textColor="@color/black"
+                    android:textColor="@android:color/black"
                     android:textFontWeight="800"
                     android:textSize="30dp"
                     app:layout_constraintEnd_toEndOf="parent"

+ 7 - 4
app/src/main/res/layout/item_unit.xml

@@ -3,17 +3,18 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical"
-    android:paddingVertical="10dp">
+    android:orientation="vertical">
 
     <TextView
         android:id="@+id/name"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
         android:layout_gravity="center"
+        android:background="?attr/selectableItemBackground"
         android:gravity="center"
         android:maxHeight="150dp"
         android:paddingHorizontal="20dp"
+        android:paddingVertical="10dp"
         android:textSize="25sp"
         tools:text="Ректорат" />
 
@@ -24,7 +25,9 @@
         android:layout_gravity="right"
         android:layout_marginTop="4dp"
         android:layout_marginEnd="30dp"
+        android:background="?attr/selectableItemBackground"
         android:maxWidth="300dp"
+        android:paddingVertical="5dp"
         android:singleLine="false"
         android:textAlignment="textEnd"
         android:textColor="@color/colorAccent"

+ 4 - 2
app/src/main/res/layout/item_user.xml

@@ -68,7 +68,7 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_gravity="left"
-                        android:textColor="@color/black"
+                        android:textColor="@android:color/black"
                         android:textSize="16sp"
                         android:textStyle="bold"
                         tools:text="Романов Николай Николаевич" />
@@ -85,10 +85,10 @@
                         android:textStyle="bold" />
 
                     <TextView
-                        android:layout_marginTop="4dp"
                         android:id="@+id/appointment_name_text"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
+                        android:layout_marginTop="4dp"
                         android:textSize="14sp"
                         tools:text="Начальник управления" />
 
@@ -111,6 +111,7 @@
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
                                 android:layout_marginEnd="5dp"
+                                android:background="?attr/selectableItemBackground"
                                 android:minWidth="30dp"
                                 android:minHeight="30dp"
                                 android:src="@drawable/ic_baseline_dialer_sip_24" />
@@ -216,6 +217,7 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginEnd="5dp"
+                        android:background="?attr/selectableItemBackground"
                         android:minWidth="30dp"
                         android:minHeight="30dp"
                         android:src="@drawable/ic_baseline_mail_outline_24" />

+ 1 - 0
app/src/main/res/layout/search_item.xml

@@ -10,6 +10,7 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_marginHorizontal="50dp"
+        android:background="?attr/selectableItemBackground"
         android:gravity="center_vertical|center_horizontal"
         android:minHeight="50dp"
         android:textSize="20sp"

+ 2 - 2
build.gradle

@@ -10,8 +10,8 @@ buildscript {
         classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5"
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
         classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
-        // NOTE: Do not place your application dependencies here; they belong
-        // in the individual module build.gradle files
+        classpath 'com.google.gms:google-services:4.3.10'
+        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.0'
     }
 }