mirror of
https://github.com/woheller69/solxpect.git
synced 2025-09-22 00:40:46 +02:00
Upgrade for Android 13
Support Dark Mode in Help Activity for Android 10+ Slightly improve contrast in Dark Mode
This commit is contained in:
parent
1a05a6348d
commit
62324ecc76
9 changed files with 24 additions and 41 deletions
|
@ -2,14 +2,14 @@ apply plugin: 'com.android.application'
|
|||
|
||||
android {
|
||||
|
||||
compileSdkVersion 32
|
||||
compileSdkVersion 33
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.woheller69.solxpect"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 31
|
||||
versionCode 18
|
||||
versionName "1.8"
|
||||
targetSdkVersion 33
|
||||
versionCode 19
|
||||
versionName "1.9"
|
||||
|
||||
buildConfigField "String", "BASE_URL", "\"https://api.open-meteo.com/v1/\""
|
||||
buildConfigField "String", "GITHUB_URL","\"https://github.com/woheller69/solxpect/\""
|
||||
|
@ -38,4 +38,5 @@ dependencies {
|
|||
implementation "androidx.lifecycle:lifecycle-viewmodel:2.5.1" //needed due to duplicate class error
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1" //needed due to duplicate class error
|
||||
implementation 'com.github.woheller69:CompassView:a63c67da90'
|
||||
implementation 'androidx.webkit:webkit:1.5.0'
|
||||
}
|
|
@ -1,11 +1,14 @@
|
|||
package org.woheller69.weather.activities;
|
||||
|
||||
import android.content.res.AssetManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.webkit.WebView;
|
||||
import org.woheller69.weather.R;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.webkit.WebSettingsCompat;
|
||||
import androidx.webkit.WebViewFeature;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -19,6 +22,12 @@ public class HelpActivity extends NavigationActivity{
|
|||
setContentView(R.layout.activity_help);
|
||||
WebView view = findViewById(R.id.help);
|
||||
|
||||
if(WebViewFeature.isFeatureSupported(WebViewFeature.ALGORITHMIC_DARKENING)) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
WebSettingsCompat.setAlgorithmicDarkeningAllowed(view.getSettings(), true);
|
||||
}
|
||||
}
|
||||
|
||||
String language = getResources().getConfiguration().getLocales().get(0).getLanguage();
|
||||
|
||||
String filename = "help-"+language+".html";
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="@color/middlegrey" />
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="@color/blue" />
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#AAFFFFFF" />
|
||||
<solid android:color="@color/lightgrey" />
|
||||
|
||||
<padding
|
||||
android:left="3dp"
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#AAFFFFFF" />
|
||||
<stroke android:width="0dp"
|
||||
android:color="#AAFFFFFF"
|
||||
/>
|
||||
<padding
|
||||
android:bottom="-3dp"
|
||||
android:top="-3dp"
|
||||
android:left="5dp"
|
||||
android:right="5dp" />
|
||||
|
||||
<corners android:radius="7dp" />
|
||||
</shape>
|
|
@ -2,10 +2,11 @@
|
|||
<resources>
|
||||
<color name="colorStatusBar">#181818</color>
|
||||
<color name="colorPrimary">#181818</color>
|
||||
<color name="colorPrimaryDark">#666666</color>
|
||||
<color name="colorAccent">#707070</color>
|
||||
<color name="colorPrimaryDark">#777777</color>
|
||||
<color name="colorAccent">#a0a0a0</color>
|
||||
<color name="colorListItem">#FFFFFF</color>
|
||||
<color name="middlegrey">#A0A0A0</color>
|
||||
<color name="middlegrey">#707070</color>
|
||||
<color name="lightgrey">#BBFFFFFF</color>
|
||||
<color name="backgroundHighlight">#2A2A2A</color>
|
||||
<color name="white">#303030</color>
|
||||
<color name="red">#d01530</color>
|
||||
|
@ -17,7 +18,7 @@
|
|||
<color name="blue">#0274b2</color>
|
||||
<color name="lightblue">#1382d4</color>
|
||||
<color name="midblue">#1b5cd9</color>
|
||||
<color name="backgroundBlue">#181818</color>
|
||||
<color name="backgroundBlue">#080808</color>
|
||||
<color name="widgetBackground">#DD181818</color>
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<color name="colorListItem">#024265</color>
|
||||
<color name="backgroundHighlight">#5fa1d2</color>
|
||||
<color name="middlegrey">#A8A8A8</color>
|
||||
<color name="lightgrey">#AAFFFFFF</color>
|
||||
<color name="white">#fafafa</color>
|
||||
<color name="red">#d01530</color>
|
||||
<color name="lightred">#fa7972</color>
|
||||
|
|
3
fastlane/metadata/android/en-US/changelogs/19.txt
Normal file
3
fastlane/metadata/android/en-US/changelogs/19.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Upgrade for Android 13
|
||||
Support Dark Mode in Help Activity for Android 10+
|
||||
Slightly improve contrast in Dark Mode
|
Loading…
Add table
Add a link
Reference in a new issue