Update to target Android 15 (SDK 35) - had to do some adjustment to layout to make MainAcivity2 display correctly
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:versionCode="152"
|
||||
android:versionName="4.3.0a">
|
||||
android:versionCode="153"
|
||||
android:versionName="4.3.0">
|
||||
<!-- android:allowBackup="false" -->
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@ package uk.org.openseizuredetector;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.core.view.MenuCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
@@ -18,6 +20,7 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
@@ -53,6 +56,26 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main2);
|
||||
|
||||
View root = findViewById(R.id.activity_main2_root_layout);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(root, (v, insets) -> {
|
||||
int topInset = 0;
|
||||
//int topInset = insets.getInsets(WindowInsetsCompat.Type.systemBars()).top;
|
||||
int actionBarHeight = 0;
|
||||
TypedValue tv = new TypedValue();
|
||||
if (getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
|
||||
actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics());
|
||||
}
|
||||
Log.i(TAG, "onCreate() - topInset = " + topInset + ", actionBarHeight = " + actionBarHeight);
|
||||
v.setPadding(
|
||||
v.getPaddingLeft(),
|
||||
actionBarHeight,
|
||||
v.getPaddingRight(),
|
||||
v.getPaddingBottom()
|
||||
);
|
||||
return insets;
|
||||
});
|
||||
|
||||
|
||||
Log.i(TAG, "onCreate()");
|
||||
|
||||
// Set our custom uncaught exception handler to report issues.
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/activity_main2_root_layout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/versionTv"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<string name="app_name">OpenSeizureDetector</string>
|
||||
<string name="changelog">
|
||||
"\n
|
||||
\nV4.3.0a - Added support for Android 14 (API 34) and above.
|
||||
\nV4.3.0 - Added support for Android 15 (API 35) and above.
|
||||
\n - Simplified data sharing editor by grouping events for editing.
|
||||
\nV4.2.12 - Added butons and menu items for 'Help' and 'Troubleshooting' to point users to the web page instructoins.
|
||||
\nV4.2 - Added support for PineTime and BangleJS Watches using Bluetooth data source.
|
||||
|
||||
Reference in New Issue
Block a user