Skip to content

Commit

Permalink
replace deprecated onBackPressed for activity navigation for android 14
Browse files Browse the repository at this point in the history
  • Loading branch information
jclark118 committed Nov 8, 2023
1 parent cb74a7e commit 884d097
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions mapcache/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def googleMapsApiReleaseKey = hasProperty('RELEASE_MAPS_MAPCACHE_API_KEY') ? REL
def googleMapsApiKeyDebug = hasProperty('DEBUG_MAPS_API_KEY') ? DEBUG_MAPS_API_KEY : ''

android {
compileSdkVersion 33
compileSdkVersion 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
Expand All @@ -22,7 +22,7 @@ android {
resValue "string", "applicationId", applicationId
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
minSdkVersion 28
targetSdkVersion 33
targetSdkVersion 34
versionCode 60
versionName '2.1.11'
multiDexEnabled true
Expand Down Expand Up @@ -83,7 +83,7 @@ task androidAppVersion {

dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
api 'androidx.appcompat:appcompat:1.3.0'
api 'androidx.appcompat:appcompat:1.6.1'
api 'com.google.android.material:material:1.6.0'
api 'androidx.preference:preference:1.2.1'
api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ protected void onCreate(Bundle savedInstanceState) {
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// NavUtils.navigateUpFromSameTask(this);
onBackPressed();
super.getOnBackPressedDispatcher().onBackPressed();
return true;
default:
return super.onOptionsItemSelected(item);
Expand Down

0 comments on commit 884d097

Please sign in to comment.