mirror of
https://github.com/woheller69/solxpect.git
synced 2026-01-31 06:25:15 +01: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
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue