Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6f43a16
AGP 8.13.2 and Gradle 8.13
martinwork Feb 11, 2026
a7eaa1f
Refactor - Migrate BuildConfig to Gradle Build Files
martinwork Feb 11, 2026
23471a7
AGP 9.0.0 Gradle 9.1.0
martinwork Feb 11, 2026
c4128e6
Target SDK 36 and update dependencies
martinwork Feb 12, 2026
5cc4714
androidx.core:core:1.17.0
martinwork Feb 13, 2026
288ef7a
edge-to-edge HomeActivity
martinwork Feb 14, 2026
5de48f9
Temporary opt out: android:enableOnBackInvokedCallback false
martinwork Feb 14, 2026
05bf950
Temporary opt out: PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY
martinwork Feb 14, 2026
aa39fda
edge-to-edge SplashScreenActivity
martinwork Feb 14, 2026
2d2a3f1
edge-to-edge MakeCodeWebView
martinwork Feb 14, 2026
565e307
edge-to-edge PairingActivity
martinwork Feb 16, 2026
31cdc54
edge-to-edge ProjectActivity
martinwork Feb 16, 2026
fe8f6af
edge-to-edge FetchActivity
martinwork Feb 16, 2026
686ceda
edge-to-edge HelpWebView
martinwork Feb 16, 2026
c89c72c
edge-to-edge HelpWebViewPopupActivity
martinwork Feb 17, 2026
4c7367b
edge-to-edge NotificationActivity
martinwork Feb 17, 2026
7ebcbcd
edge-to-edge MakeCode
martinwork Feb 17, 2026
6dcfb7d
edge-to-edge MakeCode avoid cutout
martinwork Feb 18, 2026
168558f
edge-to-edge MakeCode avoid keyboard
martinwork Mar 1, 2026
8d28863
edge-to-edge MakeCode avoid keyboard
martinwork Mar 2, 2026
49f2d22
edge-to-edge MakeCode orientation and keyboard changes
martinwork Mar 3, 2026
76a6493
Revert to DFU 2.4.1
martinwork Mar 6, 2026
607c87c
edge-to-edge My Data
martinwork Mar 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ local.properties
.idea/deploymentTargetDropDown.xml
.idea/appInsightsSettings.xml
.idea/deploymentTargetSelector.xml
.idea/AndroidProjectSystem.xml
.idea/runConfigurations.xml
.idea/deviceManager.xml
*.iml

# OS-specific files
Expand Down
2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdk 35
compileSdk=36
defaultConfig {
applicationId "com.samsung.microbit"
minSdkVersion 21
targetSdk 35
minSdkVersion 23
targetSdk 36
// When target SDK version is 30+,
// requestLegacyExternalStorage will continue to work for 29 Android 10
}
Expand All @@ -20,7 +20,7 @@ android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
Expand All @@ -30,19 +30,23 @@ android {
lint {
abortOnError false
}
buildFeatures {
buildConfig true
}
}

dependencies {
implementation 'androidx.lifecycle:lifecycle-process:2.9.2'
implementation 'androidx.core:core:1.17.0'
implementation 'androidx.lifecycle:lifecycle-process:2.10.0'
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'com.google.android.material:material:1.12.0'
implementation 'com.google.android.material:material:1.13.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.4.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.29'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.30'
implementation 'no.nordicsemi.android:dfu:2.4.1'
implementation project(':pfLibrary')
implementation 'com.google.android.gms:play-services-analytics:18.1.1'
implementation 'com.google.code.gson:gson:2.13.1'
implementation 'com.google.code.gson:gson:2.13.2'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
}
12 changes: 10 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,23 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"
android:requestLegacyExternalStorage="true">
android:requestLegacyExternalStorage="true"
android:enableOnBackInvokedCallback="false">
<property
android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY"
android:value="true"/>

<activity
android:name=".ui.activity.HomeActivity"
android:theme="@style/AppTheme.NoActionBar.EdgeMainGray"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="@string/home_activity_name"
android:launchMode="singleTop"/>

<!-- label was changed(removed colon), because some file managers (e.g. Total Commander) cannot open the activity.-->
<activity
android:name=".ui.activity.ProjectActivity"
android:theme="@style/AppTheme.NoActionBar.EdgeMainGray"
android:label="@string/app_name_without_colon"
android:configChanges="orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustResize"
Expand Down Expand Up @@ -132,6 +138,7 @@
android:configChanges="orientation|screenSize" />
<activity
android:name=".ui.activity.PairingActivity"
android:theme="@style/AppTheme.NoActionBar.EdgeMainGray"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="@string/title_activity_connect"
android:launchMode="singleTop"
Expand All @@ -154,8 +161,9 @@
android:launchMode="singleTask"/>
<activity
android:name=".ui.activity.MakeCodeWebView"
android:configChanges="orientation|screenSize"
android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
android:label="MakeCode Webview"
android:windowSoftInputMode="adjustResize"
android:launchMode="singleTask"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import android.widget.TextView;

import androidx.core.app.NotificationCompat;
import androidx.core.view.WindowCompat;

import com.samsung.microbit.R;
import com.samsung.microbit.plugin.AudioRecordPlugin;
Expand Down Expand Up @@ -109,11 +110,8 @@ public void onClick(View v) {
@Override
protected void onCreate(Bundle savedInstanceState) {

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);
WindowCompat.enableEdgeToEdge(getWindow());

mLaunchActivity = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

Expand All @@ -40,6 +41,8 @@
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.PermissionChecker;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowCompat;

import com.samsung.microbit.MBApp;
import com.samsung.microbit.MBAppState;
Expand Down Expand Up @@ -246,11 +249,8 @@ public void run() {
protected void onCreate(Bundle savedInstanceState) {
logi("onCreate");

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);
WindowCompat.enableEdgeToEdge(getWindow());

displayCreate();

Expand Down Expand Up @@ -741,12 +741,34 @@ private void displayCreate() {
//Remove title bar
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.fetch_main);

// Pass insets to children
ViewCompat.setOnApplyWindowInsetsListener( findViewById(R.id.fetchMain), (v, windowInsets) -> {
LinearLayout root = (LinearLayout) v;
int childCount = root.getChildCount();
for (int index = 0; index < childCount; ++index) {
ViewCompat.dispatchApplyWindowInsets( root.getChildAt(index), windowInsets);
}
return windowInsets;
});

displayHtmlDelete();
displayInit();
}

public void displayConfigurationChanged(Configuration newConfig) {
setContentView(R.layout.fetch_main);

// Pass insets to children
ViewCompat.setOnApplyWindowInsetsListener( findViewById(R.id.fetchMain), (v, windowInsets) -> {
LinearLayout root = (LinearLayout) v;
int childCount = root.getChildCount();
for (int index = 0; index < childCount; ++index) {
ViewCompat.dispatchApplyWindowInsets( root.getChildAt(index), windowInsets);
}
return windowInsets;
});

displayInit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import android.webkit.WebView;
import android.webkit.WebViewClient;

import androidx.core.view.WindowCompat;

import com.samsung.microbit.R;

/**
Expand All @@ -30,11 +32,8 @@ protected void onStop() {
@Override
protected void onCreate(Bundle savedInstanceState) {

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);
WindowCompat.enableEdgeToEdge(getWindow());

setContentView(R.layout.activity_help_web_view);
webView = (WebView) findViewById(R.id.generalView);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import androidx.core.content.ContextCompat;
import androidx.core.content.PermissionChecker;
import androidx.core.view.GravityCompat;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowCompat;
import androidx.drawerlayout.widget.DrawerLayout;

import com.samsung.microbit.MBApp;
Expand Down Expand Up @@ -124,11 +126,8 @@ protected void onStop() {
protected void onCreate(Bundle savedInstanceState) {
logi("onCreate() :: ");

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);
WindowCompat.enableEdgeToEdge(getWindow());

setContentView(R.layout.activity_home);

Expand Down Expand Up @@ -171,6 +170,12 @@ private void setupButtonsFontStyle() {
*/
private void setupDrawer() {

// DrawLayout passes insets to children
// Allow left side menu (custom_nav_header_main, nav_view) to pass insets to child ScrollView
ViewCompat.setOnApplyWindowInsetsListener( findViewById(R.id.nav_view), (v, windowInsets) -> {
return windowInsets;
});

Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setNavigationContentDescription(R.string.content_description_toolbar_home);
ImageView imgToolbarLogo = (ImageView) findViewById(R.id.img_toolbar_logo);
Expand Down
Loading