Skip to content

Commit 10aced4

Browse files
committed
V2.7
SDK 35 Android 15
1 parent 02b78a9 commit 10aced4

23 files changed

+71
-81
lines changed

app/build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ android {
1313
includeInBundle = false
1414
}
1515

16-
compileSdk 34
16+
compileSdk 35
17+
android.buildFeatures.buildConfig true
18+
namespace 'org.woheller69.weather'
1719

1820
defaultConfig {
1921
applicationId "org.woheller69.solxpect"
2022
minSdkVersion 26
21-
targetSdk 34
22-
versionCode 26
23-
versionName "2.6"
23+
targetSdk 35
24+
versionCode 27
25+
versionName "2.7"
2426

2527
buildConfigField "String", "BASE_URL", "\"https://api.open-meteo.com/v1/\""
2628
buildConfigField "String", "TILES_URL","\"https://tile.openstreetmap.org/\""
@@ -40,16 +42,14 @@ dependencies {
4042
implementation fileTree(dir: 'libs', include: ['*.jar'])
4143
implementation 'com.diogobernardino:williamchart:2.2'
4244
implementation 'net.e175.klaus:solarpositioning:0.1.10'
43-
implementation 'androidx.preference:preference:1.2.0'
44-
implementation 'androidx.appcompat:appcompat:1.5.1'
45-
implementation 'com.google.android.material:material:1.6.1'
45+
implementation 'androidx.preference:preference:1.2.1'
46+
implementation 'androidx.appcompat:appcompat:1.7.1'
47+
implementation 'com.google.android.material:material:1.12.0'
4648
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
4749
implementation 'com.android.volley:volley:1.2.1'
48-
implementation 'androidx.recyclerview:recyclerview:1.2.1'
50+
implementation 'androidx.recyclerview:recyclerview:1.4.0'
4951
implementation 'androidx.cardview:cardview:1.0.0'
5052
implementation 'net.lingala.zip4j:zip4j:2.9.1'
51-
implementation "androidx.lifecycle:lifecycle-viewmodel:2.5.1" //needed due to duplicate class error
52-
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1" //needed due to duplicate class error
5353
implementation 'com.github.woheller69:CompassView:948f3db329'
5454
implementation 'androidx.webkit:webkit:1.5.0'
5555
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.woheller69.weather">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<uses-permission android:name="android.permission.INTERNET" />
65
<uses-permission android:name="android.permission.WAKE_LOCK" />

app/src/main/java/org/woheller69/weather/activities/AboutActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package org.woheller69.weather.activities;
22

3+
import android.os.Build;
34
import android.os.Bundle;
45
import android.text.method.LinkMovementMethod;
6+
import android.view.WindowInsetsController;
57
import android.widget.TextView;
68

79
import org.woheller69.weather.BuildConfig;
@@ -15,6 +17,12 @@ public class AboutActivity extends NavigationActivity {
1517
protected void onCreate(Bundle savedInstanceState) {
1618
super.onCreate(savedInstanceState);
1719
setContentView(R.layout.activity_about);
20+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
21+
getWindow().getInsetsController().setSystemBarsAppearance(
22+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
23+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
24+
);
25+
}
1826

1927
((TextView) findViewById(R.id.openmeteoURL)).setMovementMethod(LinkMovementMethod.getInstance());
2028
((TextView) findViewById(R.id.githubURL)).setMovementMethod(LinkMovementMethod.getInstance());

app/src/main/java/org/woheller69/weather/activities/BackupRestoreActivity.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import android.os.Environment;
1010
import android.view.Gravity;
1111
import android.view.View;
12+
import android.view.WindowInsetsController;
1213
import android.widget.Toast;
1314

1415
import androidx.activity.result.ActivityResultLauncher;
@@ -33,7 +34,12 @@ public class BackupRestoreActivity extends NavigationActivity{
3334
protected void onCreate(Bundle savedInstanceState) {
3435
super.onCreate(savedInstanceState);
3536
setContentView(R.layout.activity_backuprestore);
36-
37+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
38+
getWindow().getInsetsController().setSystemBarsAppearance(
39+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
40+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
41+
);
42+
}
3743

3844
ActionBar actionBar = getSupportActionBar();
3945
if (actionBar != null) {

app/src/main/java/org/woheller69/weather/activities/ForecastCityActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.content.Context;
44
import android.content.Intent;
55
import android.content.SharedPreferences;
6+
import android.os.Build;
67
import android.os.Bundle;
78

89
import androidx.appcompat.app.AlertDialog;
@@ -16,6 +17,7 @@
1617
import android.view.Menu;
1718
import android.view.MenuItem;
1819
import android.view.View;
20+
import android.view.WindowInsetsController;
1921
import android.view.animation.Animation;
2022
import android.view.animation.LinearInterpolator;
2123
import android.view.animation.RotateAnimation;
@@ -93,6 +95,12 @@ protected void onCreate(Bundle savedInstanceState) {
9395
super.onCreate(savedInstanceState);
9496
context=this;
9597
setContentView(R.layout.activity_forecast_city);
98+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
99+
getWindow().getInsetsController().setSystemBarsAppearance(
100+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
101+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
102+
);
103+
}
96104

97105
initResources();
98106

app/src/main/java/org/woheller69/weather/activities/HelpActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.content.res.AssetManager;
44
import android.os.Build;
55
import android.os.Bundle;
6+
import android.view.WindowInsetsController;
67
import android.webkit.WebView;
78
import org.woheller69.weather.R;
89

@@ -20,6 +21,13 @@ public class HelpActivity extends NavigationActivity{
2021
protected void onCreate(Bundle savedInstanceState) {
2122
super.onCreate(savedInstanceState);
2223
setContentView(R.layout.activity_help);
24+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
25+
getWindow().getInsetsController().setSystemBarsAppearance(
26+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
27+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
28+
);
29+
}
30+
2331
WebView view = findViewById(R.id.help);
2432

2533
if(WebViewFeature.isFeatureSupported(WebViewFeature.ALGORITHMIC_DARKENING)) {

app/src/main/java/org/woheller69/weather/activities/ManageLocationsActivity.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.woheller69.weather.activities;
22

33
import android.content.Context;
4+
import android.os.Build;
45
import android.os.Bundle;
56
import com.google.android.material.floatingactionbutton.FloatingActionButton;
67
import com.redinput.compassview.CompassView;
@@ -17,6 +18,7 @@
1718
import android.view.LayoutInflater;
1819
import android.view.View;
1920
import android.view.ViewGroup;
21+
import android.view.WindowInsetsController;
2022
import android.view.WindowManager;
2123
import android.widget.CheckBox;
2224
import android.widget.EditText;
@@ -62,6 +64,13 @@ public class ManageLocationsActivity extends NavigationActivity {
6264
protected void onCreate(Bundle savedInstanceState) {
6365
super.onCreate(savedInstanceState);
6466
setContentView(R.layout.activity_manage_locations);
67+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
68+
getWindow().getInsetsController().setSystemBarsAppearance(
69+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
70+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
71+
);
72+
}
73+
6574
context=this;
6675
database = SQLiteHelper.getInstance(getApplicationContext());
6776

app/src/main/java/org/woheller69/weather/activities/SettingsActivity.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import android.content.SharedPreferences;
55
import android.os.Build;
66
import android.os.Bundle;
7+
import android.view.WindowInsetsController;
78

89
import androidx.annotation.NonNull;
910
import androidx.annotation.RequiresApi;
@@ -40,7 +41,12 @@ protected void onCreate(Bundle savedInstanceState) {
4041
super.onCreate(savedInstanceState);
4142

4243
setContentView(R.layout.activity_settings);
43-
44+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
45+
getWindow().getInsetsController().setSystemBarsAppearance(
46+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
47+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
48+
);
49+
}
4450
}
4551

4652
@Override

app/src/main/java/org/woheller69/weather/firststart/TutorialActivity.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import android.view.View;
1515
import android.view.ViewGroup;
1616
import android.view.Window;
17+
import android.view.WindowInsetsController;
1718
import android.view.WindowManager;
1819

1920
import android.widget.Button;
@@ -46,7 +47,12 @@ protected void onCreate(Bundle savedInstanceState) {
4647
super.onCreate(savedInstanceState);
4748

4849
setContentView(R.layout.activity_tutorial);
49-
50+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
51+
getWindow().getInsetsController().setSystemBarsAppearance(
52+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
53+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
54+
);
55+
}
5056
viewPager = (ViewPager) findViewById(R.id.view_pager);
5157
dotsLayout = (LinearLayout) findViewById(R.id.layoutDots);
5258
btnNext = (Button) findViewById(R.id.btn_next);
@@ -62,8 +68,6 @@ protected void onCreate(Bundle savedInstanceState) {
6268
// adding bottom dots
6369
addBottomDots(0);
6470

65-
// making notification bar transparent
66-
changeStatusBarColor();
6771

6872
myViewPagerAdapter = new MyViewPagerAdapter();
6973
viewPager.setAdapter(myViewPagerAdapter);
@@ -158,17 +162,6 @@ public void onPageScrollStateChanged(int arg0) {
158162
}
159163
};
160164

161-
/**
162-
* Making notification bar transparent
163-
*/
164-
private void changeStatusBarColor() {
165-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
166-
Window window = getWindow();
167-
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
168-
window.setStatusBarColor(Color.TRANSPARENT);
169-
}
170-
}
171-
172165
/**
173166
* View pager adapter
174167
*/

app/src/main/res/layout/activity_about.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
android:id="@+id/drawer_layout"
66
android:layout_width="match_parent"
77
android:layout_height="match_parent"
8-
android:fitsSystemWindows="true"
98
tools:openDrawer="start">
109

1110
<androidx.coordinatorlayout.widget.CoordinatorLayout

0 commit comments

Comments
 (0)