From 9f16cb72d1c1c46941a73a8d6196d6299e23b168 Mon Sep 17 00:00:00 2001 From: cjee21 <77721854+cjee21@users.noreply.github.com> Date: Thu, 14 May 2026 21:18:06 +0800 Subject: [PATCH 1/7] Android GUI: Update dependencies --- Source/GUI/Android/app/build.gradle | 18 ++++++++---------- Source/GUI/Android/build.gradle | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Source/GUI/Android/app/build.gradle b/Source/GUI/Android/app/build.gradle index 308d3bffb3..cd8f61fc97 100644 --- a/Source/GUI/Android/app/build.gradle +++ b/Source/GUI/Android/app/build.gradle @@ -14,7 +14,7 @@ android { defaultConfig { applicationId "net.mediaarea.mediainfo" multiDexEnabled = true - minSdkVersion 21 + minSdkVersion 23 versionCode 60 versionName "26.10" targetSdkVersion 37 @@ -202,9 +202,9 @@ tasks.register('copyLocales', DefaultTask) { preBuild.dependsOn copyLocales dependencies { - implementation 'com.google.android.material:material:1.13.0' // can only upgrade when minSdkVersion >= 23 + implementation 'com.google.android.material:material:1.14.0' implementation 'androidx.appcompat:appcompat:1.7.1' - implementation "androidx.core:core-ktx:1.17.0" // can only upgrade when minSdkVersion >= 23 + implementation "androidx.core:core-ktx:1.18.0" implementation 'androidx.documentfile:documentfile:1.1.0' implementation 'androidx.preference:preference-ktx:1.2.1' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' @@ -213,17 +213,15 @@ dependencies { androidTestImplementation 'androidx.test:runner:1.7.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0' // Android Room - // can only upgrade when minSdkVersion >= 23 - implementation 'androidx.room:room-runtime:2.7.2' - implementation 'androidx.room:room-ktx:2.7.2' - ksp 'androidx.room:room-compiler:2.7.2' + implementation 'androidx.room:room-runtime:2.8.4' + implementation 'androidx.room:room-ktx:2.8.4' + ksp 'androidx.room:room-compiler:2.8.4' // Android Lifecycle implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' ksp "androidx.lifecycle:lifecycle-common-java8:2.10.0" // Google Billing - // can only upgrade when minSdkVersion >= 23 - implementation "com.android.billingclient:billing:8.0.0" - implementation "com.android.billingclient:billing-ktx:8.0.0" + implementation "com.android.billingclient:billing:9.0.0" + implementation "com.android.billingclient:billing-ktx:9.0.0" // KotlinX Coroutines implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0" // Locales manager diff --git a/Source/GUI/Android/build.gradle b/Source/GUI/Android/build.gradle index 57108c52c2..4151b68763 100644 --- a/Source/GUI/Android/build.gradle +++ b/Source/GUI/Android/build.gradle @@ -6,8 +6,8 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:9.2.0' - classpath 'com.android.tools.build:gradle-settings-api:9.2.0' + classpath 'com.android.tools.build:gradle:9.2.1' + classpath 'com.android.tools.build:gradle-settings-api:9.2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files From b9de31d72de04bc603b75563c598b833b0211cb9 Mon Sep 17 00:00:00 2001 From: cjee21 <77721854+cjee21@users.noreply.github.com> Date: Thu, 14 May 2026 21:31:24 +0800 Subject: [PATCH 2/7] Android GUI: Use Material 3 Expressive theme --- Source/GUI/Android/app/src/main/res/values/styles.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/GUI/Android/app/src/main/res/values/styles.xml b/Source/GUI/Android/app/src/main/res/values/styles.xml index 0b1ab2211e..405118a5a5 100644 --- a/Source/GUI/Android/app/src/main/res/values/styles.xml +++ b/Source/GUI/Android/app/src/main/res/values/styles.xml @@ -8,7 +8,7 @@ - - - From 804a79985417118118aa0cbf27fc9101351643d3 Mon Sep 17 00:00:00 2001 From: cjee21 <77721854+cjee21@users.noreply.github.com> Date: Thu, 14 May 2026 22:02:55 +0800 Subject: [PATCH 3/7] Android GUI: Remove no longer needed API check --- .../net/mediaarea/mediainfo/ReportListActivity.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Source/GUI/Android/app/src/main/java/net/mediaarea/mediainfo/ReportListActivity.kt b/Source/GUI/Android/app/src/main/java/net/mediaarea/mediainfo/ReportListActivity.kt index a242381e39..49964852fb 100644 --- a/Source/GUI/Android/app/src/main/java/net/mediaarea/mediainfo/ReportListActivity.kt +++ b/Source/GUI/Android/app/src/main/java/net/mediaarea/mediainfo/ReportListActivity.kt @@ -147,14 +147,12 @@ class ReportListActivity : AppCompatActivity(), ReportActivityListener { private fun handleUri(uri: Uri, isMultiple: Boolean = false) { when (uri.scheme) { "file" -> { - if (Build.VERSION.SDK_INT >= 23) { - if (checkSelfPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { - pendingFileUris.add(uri) - ActivityCompat.requestPermissions(this@ReportListActivity, - arrayOf(android.Manifest.permission.READ_EXTERNAL_STORAGE), - READ_EXTERNAL_STORAGE_PERMISSION_REQUEST) - return - } + if (checkSelfPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { + pendingFileUris.add(uri) + ActivityCompat.requestPermissions(this@ReportListActivity, + arrayOf(android.Manifest.permission.READ_EXTERNAL_STORAGE), + READ_EXTERNAL_STORAGE_PERMISSION_REQUEST) + return } } "content" -> { From b2fe88ba485bb687301807b2e45504437e50497d Mon Sep 17 00:00:00 2001 From: cjee21 <77721854+cjee21@users.noreply.github.com> Date: Fri, 15 May 2026 00:35:31 +0800 Subject: [PATCH 4/7] Android GUI: Material Expressive list --- .../mediaarea/mediainfo/ReportListActivity.kt | 7 +- .../res/color/listitemcardview_selector.xml | 5 ++ .../main/res/layout/activity_report_list.xml | 1 + .../app/src/main/res/layout/clear_button.xml | 35 ++++++-- .../main/res/layout/report_list_content.xml | 82 ++++++++++++------- 5 files changed, 90 insertions(+), 40 deletions(-) create mode 100644 Source/GUI/Android/app/src/main/res/color/listitemcardview_selector.xml diff --git a/Source/GUI/Android/app/src/main/java/net/mediaarea/mediainfo/ReportListActivity.kt b/Source/GUI/Android/app/src/main/java/net/mediaarea/mediainfo/ReportListActivity.kt index 49964852fb..0b96ed30b3 100644 --- a/Source/GUI/Android/app/src/main/java/net/mediaarea/mediainfo/ReportListActivity.kt +++ b/Source/GUI/Android/app/src/main/java/net/mediaarea/mediainfo/ReportListActivity.kt @@ -30,6 +30,7 @@ import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView import com.google.android.material.dialog.MaterialAlertDialogBuilder +import com.google.android.material.listitem.ListItemViewHolder import android.os.Build import android.os.Bundle @@ -769,6 +770,7 @@ class ReportListActivity : AppCompatActivity(), ReportActivityListener { is ReportListItem.ReportData -> { if (holder is ListViewHolder) { val report: Report = item.report + holder.bind(position, currentList.size - 1) // Last is button holder.name.text = report.filename holder.id = report.id with(holder.itemView) { @@ -780,6 +782,7 @@ class ReportListActivity : AppCompatActivity(), ReportActivityListener { } is ReportListItem.ClearButton -> { if (holder is ButtonViewHolder) { + holder.bind(0, 1) with(holder.itemView) { setOnClickListener { reportModel.deleteAllReports() @@ -803,7 +806,7 @@ class ReportListActivity : AppCompatActivity(), ReportActivityListener { } } - inner class ListViewHolder(binding: ReportListContentBinding) : RecyclerView.ViewHolder(binding.root) { + inner class ListViewHolder(binding: ReportListContentBinding) : ListItemViewHolder(binding.root) { val name: TextView = binding.nameText var id: Int = -1 @@ -815,7 +818,7 @@ class ReportListActivity : AppCompatActivity(), ReportActivityListener { } } - inner class ButtonViewHolder(val binding: ClearButtonBinding) : RecyclerView.ViewHolder(binding.root) + inner class ButtonViewHolder(val binding: ClearButtonBinding) : ListItemViewHolder(binding.root) } companion object { diff --git a/Source/GUI/Android/app/src/main/res/color/listitemcardview_selector.xml b/Source/GUI/Android/app/src/main/res/color/listitemcardview_selector.xml new file mode 100644 index 0000000000..be2d9154e3 --- /dev/null +++ b/Source/GUI/Android/app/src/main/res/color/listitemcardview_selector.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Source/GUI/Android/app/src/main/res/layout/activity_report_list.xml b/Source/GUI/Android/app/src/main/res/layout/activity_report_list.xml index 6f7ca3da8d..b8f2c4ffc0 100644 --- a/Source/GUI/Android/app/src/main/res/layout/activity_report_list.xml +++ b/Source/GUI/Android/app/src/main/res/layout/activity_report_list.xml @@ -28,6 +28,7 @@ -