Skip to content

Commit 367a8cc

Browse files
Keep system status bar out of the Action Bar area
Top padding to respect the safe area on mobile.
2 parents 1e00cb9 + befb415 commit 367a8cc

File tree

15 files changed

+58
-43
lines changed

15 files changed

+58
-43
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/dist/
2-
/.idea/
2+
.idea/
33
/node_modules/
44

55
.DS_Store

android/app/capacitor.build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99

1010
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
1111
dependencies {
12-
implementation project(':capacitor-status-bar')
12+
implementation project(':capacitor-community-safe-area')
1313

1414
}
1515

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
package org.microbit.createai;
22

3+
import androidx.activity.EdgeToEdge;
4+
35
import com.getcapacitor.BridgeActivity;
46

5-
public class MainActivity extends BridgeActivity {}
7+
public class MainActivity extends BridgeActivity {
8+
9+
@Override
10+
public void onStart() {
11+
super.onStart();
12+
EdgeToEdge.enable(this);
13+
}
14+
15+
}

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.7.2'
10+
classpath 'com.android.tools.build:gradle:8.13.1'
1111
classpath 'com.google.gms:google-services:4.4.2'
1212

1313
// NOTE: Do not place your application dependencies here; they belong

android/capacitor.settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
include ':capacitor-android'
33
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
44

5-
include ':capacitor-status-bar'
6-
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
5+
include ':capacitor-community-safe-area'
6+
project(':capacitor-community-safe-area').projectDir = new File('../node_modules/@capacitor-community/safe-area/android')

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

capacitor.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import type { CapacitorConfig } from '@capacitor/cli';
33
const config: CapacitorConfig = {
44
appId: 'org.microbit.createai',
55
appName: 'micro:bit CreateAI',
6-
webDir: 'dist'
6+
webDir: 'dist',
7+
android: {
8+
adjustMarginsForEdgeToEdge: 'disable'
9+
}
710
};
811

912
export default config;

index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@
6262
style="
6363
overscroll-behavior-y: none;
6464
height: 100%;
65-
padding-top: env(safe-area-inset-top);
66-
padding-bottom: env(safe-area-inset-bottom);
6765
"
6866
>
6967
<div id="root" style="overscroll-behavior-y: none; height: 100%"></div>

ios/App/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ install! 'cocoapods', :disable_input_output_paths => true
1111
def capacitor_pods
1212
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
1313
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
14-
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
14+
pod 'CapacitorCommunitySafeArea', :path => '../../node_modules/@capacitor-community/safe-area'
1515
end
1616

1717
target 'App' do

ios/App/Podfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
PODS:
22
- Capacitor (7.4.4):
33
- CapacitorCordova
4-
- CapacitorCordova (7.4.4)
5-
- CapacitorStatusBar (7.0.3):
4+
- CapacitorCommunitySafeArea (7.0.0-beta.5):
65
- Capacitor
6+
- CapacitorCordova (7.4.4)
77

88
DEPENDENCIES:
99
- "Capacitor (from `../../node_modules/@capacitor/ios`)"
10+
- "CapacitorCommunitySafeArea (from `../../node_modules/@capacitor-community/safe-area`)"
1011
- "CapacitorCordova (from `../../node_modules/@capacitor/ios`)"
11-
- "CapacitorStatusBar (from `../../node_modules/@capacitor/status-bar`)"
1212

1313
EXTERNAL SOURCES:
1414
Capacitor:
1515
:path: "../../node_modules/@capacitor/ios"
16+
CapacitorCommunitySafeArea:
17+
:path: "../../node_modules/@capacitor-community/safe-area"
1618
CapacitorCordova:
1719
:path: "../../node_modules/@capacitor/ios"
18-
CapacitorStatusBar:
19-
:path: "../../node_modules/@capacitor/status-bar"
2020

2121
SPEC CHECKSUMS:
22-
Capacitor: 09d9ff8e9618e8c4b3cab2bbee34a17215dd2fef
22+
Capacitor: 358dd1c3fdd71d969547b17e159fd8a7736cb45f
23+
CapacitorCommunitySafeArea: 53e3ad999bada9892cb4e9aca8fa8012aabad4b2
2324
CapacitorCordova: bf648a636f3c153f652d312ae145fb508b6ffced
24-
CapacitorStatusBar: 7d8fcbd6768db014bd721d75e246590b014928e8
2525

26-
PODFILE CHECKSUM: 2dda0cc353931d1c074294a0067df65453b878b5
26+
PODFILE CHECKSUM: b14023669789a78b7a53c7515766b1a886b64d37
2727

28-
COCOAPODS: 1.15.2
28+
COCOAPODS: 1.16.2

0 commit comments

Comments
 (0)