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

Flutter – Android Studio Setup

I am experiencing an issue with Android Studio where the download progress is not being displayed. Despite waiting for over 20 minutes, the status remains stuck on “Preparing,” and no progress bar or percentage is shown. This makes it difficult…

VIEW QUESTION
Back To Top
Search