diff --git a/oeffi/res/values-night-v29/colors.xml b/oeffi/res/values-night-v29/colors.xml deleted file mode 100644 index 1734f89..0000000 --- a/oeffi/res/values-night-v29/colors.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - @android:color/transparent - @android:color/transparent - @android:color/transparent - - diff --git a/oeffi/res/values-night/colors.xml b/oeffi/res/values-night/colors.xml index a0653fd..179b8b9 100644 --- a/oeffi/res/values-night/colors.xml +++ b/oeffi/res/values-night/colors.xml @@ -23,7 +23,6 @@ #444444 #ffff00 #bbbbbb - #44000000 0.8 diff --git a/oeffi/res/values-night/styles.xml b/oeffi/res/values-night/styles.xml index 4ef9f8d..f80397d 100644 --- a/oeffi/res/values-night/styles.xml +++ b/oeffi/res/values-night/styles.xml @@ -5,8 +5,6 @@ diff --git a/oeffi/res/values-notnight-v29/styes.xml b/oeffi/res/values-notnight-v29/styes.xml index 6cf7297..92f8177 100644 --- a/oeffi/res/values-notnight-v29/styes.xml +++ b/oeffi/res/values-notnight-v29/styes.xml @@ -4,8 +4,6 @@ diff --git a/oeffi/res/values-v29/colors.xml b/oeffi/res/values-v29/colors.xml deleted file mode 100644 index 1734f89..0000000 --- a/oeffi/res/values-v29/colors.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - @android:color/transparent - @android:color/transparent - @android:color/transparent - - diff --git a/oeffi/res/values/colors.xml b/oeffi/res/values/colors.xml index dd27815..255d6ee 100644 --- a/oeffi/res/values/colors.xml +++ b/oeffi/res/values/colors.xml @@ -37,9 +37,6 @@ #757575 #bbbbbb #ff4444 - #44000000 - @android:color/black - #44000000 1 diff --git a/oeffi/res/values/styles.xml b/oeffi/res/values/styles.xml index 727a1f6..8a913e7 100644 --- a/oeffi/res/values/styles.xml +++ b/oeffi/res/values/styles.xml @@ -5,8 +5,6 @@ @@ -27,13 +23,10 @@ diff --git a/oeffi/src/de/schildbach/oeffi/OeffiActivity.java b/oeffi/src/de/schildbach/oeffi/OeffiActivity.java index a4f76a1..2a6edc4 100644 --- a/oeffi/src/de/schildbach/oeffi/OeffiActivity.java +++ b/oeffi/src/de/schildbach/oeffi/OeffiActivity.java @@ -20,6 +20,7 @@ package de.schildbach.oeffi; import android.app.ActivityManager.TaskDescription; import android.content.SharedPreferences; import android.content.res.Resources; +import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.preference.PreferenceManager; @@ -29,6 +30,8 @@ import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import androidx.activity.ComponentActivity; +import androidx.activity.EdgeToEdge; +import androidx.activity.SystemBarStyle; import de.schildbach.oeffi.network.NetworkResources; import de.schildbach.oeffi.util.ErrorReporter; import de.schildbach.pte.NetworkId; @@ -44,6 +47,7 @@ public abstract class OeffiActivity extends ComponentActivity { @Override protected void onCreate(final Bundle savedInstanceState) { + EdgeToEdge.enable(this, SystemBarStyle.dark(Color.TRANSPARENT)); super.onCreate(savedInstanceState); this.application = (Application) getApplication(); this.prefs = PreferenceManager.getDefaultSharedPreferences(this); diff --git a/oeffi/src/de/schildbach/oeffi/directions/DirectionsActivity.java b/oeffi/src/de/schildbach/oeffi/directions/DirectionsActivity.java index 7d1b8a8..4fcfd0a 100644 --- a/oeffi/src/de/schildbach/oeffi/directions/DirectionsActivity.java +++ b/oeffi/src/de/schildbach/oeffi/directions/DirectionsActivity.java @@ -307,7 +307,6 @@ public class DirectionsActivity extends OeffiMainActivity implements QueryHistor backgroundHandler = new Handler(backgroundThread.getLooper()); setContentView(R.layout.directions_content); - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); findViewById(android.R.id.content).setOnApplyWindowInsetsListener((v, insets) -> { v.setPadding(insets.getSystemWindowInsetLeft(), 0, insets.getSystemWindowInsetRight(), 0); return insets; diff --git a/oeffi/src/de/schildbach/oeffi/directions/TripDetailsActivity.java b/oeffi/src/de/schildbach/oeffi/directions/TripDetailsActivity.java index 5d08c9b..4345fd0 100644 --- a/oeffi/src/de/schildbach/oeffi/directions/TripDetailsActivity.java +++ b/oeffi/src/de/schildbach/oeffi/directions/TripDetailsActivity.java @@ -186,7 +186,6 @@ public class TripDetailsActivity extends OeffiActivity implements LocationListen scheduleTripIntent = scheduleTripIntent(trip); setContentView(R.layout.directions_trip_details_content); - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); findViewById(android.R.id.content).setOnApplyWindowInsetsListener((v, insets) -> { v.setPadding(insets.getSystemWindowInsetLeft(), 0, insets.getSystemWindowInsetRight(), 0); return insets; diff --git a/oeffi/src/de/schildbach/oeffi/directions/TripsOverviewActivity.java b/oeffi/src/de/schildbach/oeffi/directions/TripsOverviewActivity.java index ad62ea8..f90d1e9 100644 --- a/oeffi/src/de/schildbach/oeffi/directions/TripsOverviewActivity.java +++ b/oeffi/src/de/schildbach/oeffi/directions/TripsOverviewActivity.java @@ -130,7 +130,6 @@ public class TripsOverviewActivity extends OeffiActivity { final Uri historyUri = historyUriStr != null ? Uri.parse(historyUriStr) : null; setContentView(R.layout.directions_trip_overview_content); - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); findViewById(android.R.id.content).setOnApplyWindowInsetsListener((v, insets) -> { v.setPadding(insets.getSystemWindowInsetLeft(), 0, insets.getSystemWindowInsetRight(), 0); return insets; diff --git a/oeffi/src/de/schildbach/oeffi/network/NetworkPickerActivity.java b/oeffi/src/de/schildbach/oeffi/network/NetworkPickerActivity.java index cab21f6..d01551f 100644 --- a/oeffi/src/de/schildbach/oeffi/network/NetworkPickerActivity.java +++ b/oeffi/src/de/schildbach/oeffi/network/NetworkPickerActivity.java @@ -25,6 +25,7 @@ import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.content.res.Resources; +import android.graphics.Color; import android.location.Address; import android.location.Criteria; import android.location.LocationManager; @@ -38,6 +39,8 @@ import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import androidx.activity.ComponentActivity; +import androidx.activity.EdgeToEdge; +import androidx.activity.SystemBarStyle; import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.contract.ActivityResultContracts; import androidx.core.content.ContextCompat; @@ -109,6 +112,7 @@ public class NetworkPickerActivity extends ComponentActivity implements Location @Override protected void onCreate(final Bundle savedInstanceState) { + EdgeToEdge.enable(this, SystemBarStyle.dark(Color.TRANSPARENT)); super.onCreate(savedInstanceState); prefs = PreferenceManager.getDefaultSharedPreferences(this); diff --git a/oeffi/src/de/schildbach/oeffi/plans/PlanActivity.java b/oeffi/src/de/schildbach/oeffi/plans/PlanActivity.java index 58d2bfd..01d7efa 100644 --- a/oeffi/src/de/schildbach/oeffi/plans/PlanActivity.java +++ b/oeffi/src/de/schildbach/oeffi/plans/PlanActivity.java @@ -23,6 +23,7 @@ import android.content.Intent; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; +import android.graphics.Color; import android.net.Uri; import android.os.Bundle; import android.os.Handler; @@ -35,6 +36,8 @@ import android.widget.PopupMenu; import android.widget.TextView; import android.widget.ViewAnimator; import androidx.activity.ComponentActivity; +import androidx.activity.EdgeToEdge; +import androidx.activity.SystemBarStyle; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -116,6 +119,7 @@ public class PlanActivity extends ComponentActivity { @Override protected void onCreate(final Bundle savedInstanceState) { + EdgeToEdge.enable(this, SystemBarStyle.dark(Color.TRANSPARENT)); super.onCreate(savedInstanceState); this.application = (Application) getApplication(); @@ -125,7 +129,6 @@ public class PlanActivity extends ComponentActivity { backgroundHandler = new Handler(backgroundThread.getLooper()); setContentView(R.layout.plans_content); - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); final Animation zoomControlsAnimation = AnimationUtils.loadAnimation(this, R.anim.zoom_controls); zoomControlsAnimation.setFillAfter(true); // workaround: set through code because XML does not work diff --git a/oeffi/src/de/schildbach/oeffi/plans/PlansPickerActivity.java b/oeffi/src/de/schildbach/oeffi/plans/PlansPickerActivity.java index 58e29db..e1bb2ef 100644 --- a/oeffi/src/de/schildbach/oeffi/plans/PlansPickerActivity.java +++ b/oeffi/src/de/schildbach/oeffi/plans/PlansPickerActivity.java @@ -110,7 +110,6 @@ public class PlansPickerActivity extends OeffiMainActivity implements LocationHe thumbCache = new Cache(cacheDir, THUMB_CACHE_SIZE); setContentView(R.layout.plans_picker_content); - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); findViewById(android.R.id.content).setOnApplyWindowInsetsListener((v, insets) -> { v.setPadding(insets.getSystemWindowInsetLeft(), 0, insets.getSystemWindowInsetRight(), 0); return insets; diff --git a/oeffi/src/de/schildbach/oeffi/stations/FavoriteStationsActivity.java b/oeffi/src/de/schildbach/oeffi/stations/FavoriteStationsActivity.java index 87ea4ed..4e4d191 100644 --- a/oeffi/src/de/schildbach/oeffi/stations/FavoriteStationsActivity.java +++ b/oeffi/src/de/schildbach/oeffi/stations/FavoriteStationsActivity.java @@ -22,7 +22,6 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.view.View; import android.widget.ViewAnimator; import androidx.activity.result.contract.ActivityResultContract; import androidx.recyclerview.widget.LinearLayoutManager; @@ -84,7 +83,6 @@ public class FavoriteStationsActivity extends OeffiActivity network = (NetworkId) intent.getSerializableExtra(INTENT_EXTRA_NETWORK); setContentView(R.layout.favorites_content); - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); findViewById(android.R.id.content).setOnApplyWindowInsetsListener((v, insets) -> { v.setPadding(insets.getSystemWindowInsetLeft(), 0, insets.getSystemWindowInsetRight(), 0); return insets; diff --git a/oeffi/src/de/schildbach/oeffi/stations/StationDetailsActivity.java b/oeffi/src/de/schildbach/oeffi/stations/StationDetailsActivity.java index 1f2ced8..78abb26 100644 --- a/oeffi/src/de/schildbach/oeffi/stations/StationDetailsActivity.java +++ b/oeffi/src/de/schildbach/oeffi/stations/StationDetailsActivity.java @@ -137,7 +137,6 @@ public class StationDetailsActivity extends OeffiActivity implements StationsAwa backgroundHandler = new Handler(backgroundThread.getLooper()); setContentView(R.layout.stations_station_details_content); - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); findViewById(android.R.id.content).setOnApplyWindowInsetsListener((v, insets) -> { v.setPadding(insets.getSystemWindowInsetLeft(), 0, insets.getSystemWindowInsetRight(), 0); return insets; diff --git a/oeffi/src/de/schildbach/oeffi/stations/StationsActivity.java b/oeffi/src/de/schildbach/oeffi/stations/StationsActivity.java index 2596490..0447cff 100644 --- a/oeffi/src/de/schildbach/oeffi/stations/StationsActivity.java +++ b/oeffi/src/de/schildbach/oeffi/stations/StationsActivity.java @@ -184,7 +184,6 @@ public class StationsActivity extends OeffiMainActivity implements StationsAware res = getResources(); setContentView(R.layout.stations_content); - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); findViewById(android.R.id.content).setOnApplyWindowInsetsListener((v, insets) -> { v.setPadding(insets.getSystemWindowInsetLeft(), 0, insets.getSystemWindowInsetRight(), 0); return insets;