Skip to content

Commit

Permalink
Target android 15
Browse files Browse the repository at this point in the history
Hide transparent status bar setting here also as edge to edge is on by default
  • Loading branch information
SimonHalvdansson committed Nov 24, 2024
1 parent d2a1746 commit 05a312a
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 16 additions & 17 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand All @@ -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"
Expand All @@ -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'

}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values-v35/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="before_android_15">false</bool>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<resources xmlns:tools="http://schemas.android.com/tools">

<bool name="before_android_15">true</bool>

<!-- These base themes are so that we can tell the app that android:isLightTheme="false"
which enables us to use darkened webview again!-->
<style name="AppThemeBase" parent="Theme.Material3.Dark.NoActionBar"></style>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/xml/root_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
app:title="Enable foldable support" />

<SwitchPreferenceCompat
app:isPreferenceVisible="@bool/before_android_15"
app:singleLineTitle="false"
app:key="pref_transparent_status_bar"
app:defaultValue="false"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}

plugins {
id('com.android.application') version '8.3.2' apply false
id('com.android.application') version '8.7.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
}

Expand Down

0 comments on commit 05a312a

Please sign in to comment.