skip to Main Content

Change the image of an ImageView by code in Android Studio

I'm trying to get an ImageView by code It's declared that way in my XML: <ImageView android:id="@+id/exo_image" android:layout_width="100dp" android:layout_height="100dp" android:src="@color/cardview_light_background"/> And I'm setting it by code that way: val bmp = BitmapFactory.decodeFile(mediaItem!!.mediaMetadata.artworkUri!!.path) view.setImageBitmap(null) if (bmp != null) { view.setImageBitmap(bmp) Log.d("TEMPS",…

VIEW QUESTION

Android Studio – Difference between build.gradle.kts and libs.versions.toml

What's the difference between build.gradle.kts and libs.versions.toml? When should each be used? build.gradle.kts (:app) plugins { alias(libs.plugins.android.application) alias(libs.plugins.jetbrains.kotlin.android) } android { namespace = "com.companyname.myapplication" compileSdk = 34 defaultConfig { applicationId = "com.companyname.myapplication" minSdk = 33 targetSdk = 34 versionCode =…

VIEW QUESTION

Json – How to pass List of data from NavGraph in android kotlin Android

Getting this error: Type mismatch: inferred type is List<BookParkingResponse.Data> but List<BookParkingResponse.Data.ParkingRequests> was expected unable to pass data bewteeen fragments Nav Graph code: navGraph <argument android:name="bookingRequestList" app:argType="com.jvm.di.model.parkingSpot.response.BookParkingResponse.Data" /> Response class @Parcelize data class BookParkingResponse( @SerializedName("data") var data: List<Data>? = null ):Parcelable…

VIEW QUESTION

Firebase – FCM send – 401 Unauthorized even though can query Firestore documents

Im trying to send FCM in my kotlin springboot backend. I can query/write firestore documents successfully. But when I try to send fcm, I got below error. message: "handleException /<endpoint> com.google.api.client.http.HttpResponseException: 401 Unauthorized POST https://fcm.googleapis.com/v1/projects/<project-id>/messages:send" The Service Account have Firebase…

VIEW QUESTION
Back To Top
Search