From 05a312a1bea53a53b25422de1270b41de8dc94b5 Mon Sep 17 00:00:00 2001 From: Simon Halvdansson Date: Sun, 24 Nov 2024 21:48:11 +0100 Subject: [PATCH] Target android 15 Hide transparent status bar setting here also as edge to edge is on by default --- .idea/compiler.xml | 2 +- app/build.gradle | 33 +++++++++---------- .../harmonichackernews/CommentsFragment.java | 9 +++-- app/src/main/res/values-v35/themes.xml | 4 +++ app/src/main/res/values/themes.xml | 2 ++ app/src/main/res/xml/root_preferences.xml | 1 + build.gradle | 2 +- 7 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 app/src/main/res/values-v35/themes.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml index b589d56e..b86273d9 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index c7dc9a2f..68e14fd9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,11 +8,11 @@ android { defaultConfig { applicationId "com.simon.harmonichackernews" minSdkVersion 23 - targetSdkVersion 34 - versionCode 60 - versionName "2.0.3" - compileSdk 34 - buildToolsVersion = "34.0.0" + targetSdkVersion 35 + versionCode 61 + versionName "2.1" + compileSdk 35 + buildToolsVersion = "35.0.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -39,25 +39,25 @@ android { } dependencies { - implementation "androidx.lifecycle:lifecycle-viewmodel:2.7.0" - implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0" + implementation "androidx.lifecycle:lifecycle-viewmodel:2.8.7" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7" - implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation "androidx.browser:browser:1.8.0" implementation "androidx.cardview:cardview:1.0.0" - implementation "androidx.fragment:fragment:1.6.2" + implementation "androidx.fragment:fragment:1.8.5" implementation 'androidx.preference:preference:1.2.1' implementation "androidx.security:security-crypto:1.1.0-alpha06" implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" - implementation 'androidx.webkit:webkit:1.10.0' - implementation "androidx.activity:activity:1.9.0" - implementation "androidx.window:window:1.2.0" - implementation "androidx.window:window-java:1.2.0" - implementation 'androidx.startup:startup-runtime:1.1.1' - implementation 'androidx.core:core:1.13.0' + implementation 'androidx.webkit:webkit:1.12.1' + implementation "androidx.activity:activity:1.9.3" + implementation "androidx.window:window:1.3.0" + implementation "androidx.window:window-java:1.3.0" + implementation 'androidx.startup:startup-runtime:1.2.0' + implementation 'androidx.core:core:1.15.0' - implementation 'com.google.android.material:material:1.11.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'com.android.volley:volley:1.2.1' implementation "com.squareup.okhttp3:okhttp:4.11.0" @@ -66,5 +66,4 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.8' implementation 'org.jsoup:jsoup:1.16.2' implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.20' - } \ No newline at end of file diff --git a/app/src/main/java/com/simon/harmonichackernews/CommentsFragment.java b/app/src/main/java/com/simon/harmonichackernews/CommentsFragment.java index 74a19e68..929f09e1 100644 --- a/app/src/main/java/com/simon/harmonichackernews/CommentsFragment.java +++ b/app/src/main/java/com/simon/harmonichackernews/CommentsFragment.java @@ -1319,10 +1319,13 @@ public void clickBrowser() { startActivity(intent); } catch (Exception e) { // If we're at a PDF or something like that, just do the original URL - intent.setData(Uri.parse(story.url)); - startActivity(intent); + try { + intent.setData(Uri.parse(story.url)); + startActivity(intent); + } catch (Exception e2) { + Utils.toast("Couldn't open URL", getContext()); + } } - } public void clickShare(View view) { diff --git a/app/src/main/res/values-v35/themes.xml b/app/src/main/res/values-v35/themes.xml new file mode 100644 index 00000000..3f308b4b --- /dev/null +++ b/app/src/main/res/values-v35/themes.xml @@ -0,0 +1,4 @@ + + + false + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 2648adab..7bb03a5d 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -1,5 +1,7 @@ + true + diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml index 96ef9cd3..971c6941 100644 --- a/app/src/main/res/xml/root_preferences.xml +++ b/app/src/main/res/xml/root_preferences.xml @@ -122,6 +122,7 @@ app:title="Enable foldable support" />