Page Menu
Home
GitPull.it
Search
Configure Global Search
Log In
Files
F11448514
D201.1773639530.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
36 KB
Referenced Files
None
Subscribers
None
D201.1773639530.diff
View Options
diff --git a/app/build.gradle b/app/build.gradle
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,20 +1,21 @@
plugins {
id 'com.google.protobuf'
- id 'kotlin-kapt'
- id 'kotlin-android'
+ id 'org.jetbrains.kotlin.android'
id 'com.android.application'
+ id 'com.google.devtools.ksp'
}
android {
- compileSdk 35
+ compileSdk 36
namespace "it.reyboz.bustorino"
defaultConfig {
applicationId "it.reyboz.bustorino"
minSdkVersion 24
- targetSdkVersion 35
- buildToolsVersion = '35.0.1'
+ //noinspection EditedTargetSdkVersion
+ targetSdkVersion 36
+ buildToolsVersion = '36.0.0'
versionCode 66
versionName "2.4.3"
vectorDrawables.useSupportLibrary = true
@@ -102,6 +103,10 @@
}
}
+ksp {
+ arg("room.schemaLocation", "$projectDir/assets/schemas")
+}
+
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
@@ -110,30 +115,30 @@
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
// Guava implementation for DBUpdateWorker
- implementation 'com.google.guava:guava:32.0.1-android'
+ implementation 'com.google.guava:guava:33.5.0-android'
implementation "androidx.fragment:fragment-ktx:$fragment_version"
- implementation "androidx.activity:activity:$activity_version"
+ implementation "androidx.activity:activity-ktx:$activity_version"
implementation "androidx.annotation:annotation:1.9.1"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation "androidx.appcompat:appcompat:$appcompat_version"
implementation "androidx.appcompat:appcompat-resources:$appcompat_version"
- implementation "androidx.preference:preference:$preference_version"
+ implementation "androidx.preference:preference-ktx:$preference_version"
implementation "androidx.work:work-runtime:$work_version"
implementation "androidx.work:work-runtime-ktx:$work_version"
- implementation "com.google.android.material:material:1.12.0"
+ implementation "com.google.android.material:material:1.13.0"
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation "androidx.coordinatorlayout:coordinatorlayout:1.3.0"
- implementation 'org.jsoup:jsoup:1.15.3'
+ implementation 'org.jsoup:jsoup:1.21.2'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
implementation 'com.android.volley:volley:1.2.1'
//maplibre
- implementation 'org.maplibre.gl:android-sdk:11.8.6'
+ implementation 'org.maplibre.gl:android-sdk:12.0.1'
implementation 'org.maplibre.gl:android-sdk-turf:6.0.1'
implementation 'org.maplibre.gl:android-plugin-annotation-v9:3.0.2'
@@ -144,9 +149,9 @@
implementation "ch.acra:acra-mail:$acra_version"
implementation "ch.acra:acra-dialog:$acra_version"
// google transit realtime
- implementation 'com.google.protobuf:protoc:3.22.3'
+ implementation 'com.google.protobuf:protoc:4.33.0'
- implementation 'com.google.protobuf:protobuf-javalite:3.22.3'
+ implementation 'com.google.protobuf:protobuf-javalite:4.33.0'
// mqtt library
//implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
//implementation 'com.github.hannesa2:paho.mqtt.android:4.4'
@@ -164,21 +169,21 @@
// Room components
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
- kapt "androidx.room:room-compiler:$room_version"
+ ksp "androidx.room:room-compiler:$room_version"
//multidex - we need this to build the app
implementation "androidx.multidex:multidex:$multidex_version"
implementation 'de.siegmar:fastcsv:2.2.2'
- testImplementation 'junit:junit:4.12'
- implementation 'junit:junit:4.12'
+ testImplementation 'junit:junit:4.13.2'
+ implementation 'junit:junit:4.13.2'
- implementation "androidx.test.ext:junit:1.1.5"
+ implementation "androidx.test.ext:junit:1.3.0"
implementation "androidx.test:core:$androidXTestVersion"
implementation "androidx.test:runner:$androidXTestVersion"
implementation "androidx.room:room-testing:$room_version"
- androidTestImplementation "androidx.test.ext:junit:1.1.5"
+ androidTestImplementation "androidx.test.ext:junit:1.3.0"
androidTestImplementation "androidx.test:core:$androidXTestVersion"
androidTestImplementation "androidx.test:runner:$androidXTestVersion"
androidTestImplementation "androidx.test:rules:$androidXTestVersion"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -51,11 +51,13 @@
android:name=".ActivityBackup"
android:label="@string/backup_activity"
android:parentActivityName=".ActivityPrincipal"
- android:theme="@style/AppTheme"
+ android:theme="@style/MapTheme"
android:exported="false"/>
<activity
android:name=".ActivityIntro"
- android:exported="false"/>
+ android:exported="false"
+ android:theme="@style/AppTheme.NoActionBar.Light"
+ />
<activity
android:name=".ActivityExperiments"
android:label="@string/experiments"
diff --git a/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt b/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt
--- a/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt
+++ b/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt
@@ -24,9 +24,15 @@
import android.util.Log
import android.view.MenuItem
import android.view.View
+import android.view.ViewGroup.MarginLayoutParams
import android.widget.Button
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
+import androidx.appcompat.widget.Toolbar
+import androidx.core.view.OnApplyWindowInsetsListener
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowInsetsCompat
+import androidx.core.view.updatePadding
import it.reyboz.bustorino.backend.utils
import it.reyboz.bustorino.middleware.BarcodeScanUtils
@@ -59,11 +65,14 @@
setSupportActionBar(mToolbar);
*/
+ val mToolbar = findViewById<Toolbar>(R.id.default_toolbar)
+ setSupportActionBar(mToolbar)
+
if (supportActionBar != null) supportActionBar!!.setDisplayHomeAsUpEnabled(true)
- val versionText = findViewById<TextView>(R.id.versionTextView)
- Log.d("BusTO About", "The version text view is: $versionText")
- versionText.text = resources.getText(R.string.app_version).toString() + ": " + BuildConfig.VERSION_NAME
+ val versionTextView = findViewById<TextView>(R.id.versionTextView)
+ Log.d("BusTO About", "The version text view is: $versionTextView")
+ versionTextView.text = resources.getText(R.string.app_version).toString() + ": " + BuildConfig.VERSION_NAME
val openTelegramButton = findViewById<Button>(R.id.openTelegramButton)
openTelegramButton.setOnClickListener { view: View? ->
@@ -87,6 +96,29 @@
openTutorialButton.setOnClickListener {
startIntroductionActivity()
}
+
+ // handle the device "insets"
+ ViewCompat.setOnApplyWindowInsetsListener(versionTextView,
+ OnApplyWindowInsetsListener { v: View?, windowInsets: WindowInsetsCompat? ->
+ val insets = windowInsets!!.getInsets(WindowInsetsCompat.Type.systemBars())
+ // Apply the insets as a margin to the view. This solution sets only the
+ // bottom, left, and right dimensions, but you can apply whichever insets are
+ // appropriate to your layout. You can also update the view padding if that's
+ // more appropriate.
+ val mlp = v!!.layoutParams as MarginLayoutParams
+ mlp.leftMargin = insets.left
+ mlp.bottomMargin = insets.bottom
+ mlp.rightMargin = insets.right
+ v.layoutParams = mlp
+
+ WindowInsetsCompat.CONSUMED
+ })
+
+ ViewCompat.setOnApplyWindowInsetsListener(mToolbar) { v: View?, windowInsets: WindowInsetsCompat? ->
+ val insets = windowInsets!!.getInsets(WindowInsetsCompat.Type.systemBars())
+ v?.updatePadding(top=insets.top)
+ windowInsets
+ }
}
fun startIntroductionActivity() {
diff --git a/app/src/main/java/it/reyboz/bustorino/ActivityBackup.kt b/app/src/main/java/it/reyboz/bustorino/ActivityBackup.kt
--- a/app/src/main/java/it/reyboz/bustorino/ActivityBackup.kt
+++ b/app/src/main/java/it/reyboz/bustorino/ActivityBackup.kt
@@ -1,6 +1,11 @@
package it.reyboz.bustorino
import android.os.Bundle
+import android.view.View
+import androidx.appcompat.widget.Toolbar
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowInsetsCompat
+import androidx.core.view.updatePadding
import it.reyboz.bustorino.fragments.BackupImportFragment
import it.reyboz.bustorino.middleware.GeneralActivity
@@ -9,11 +14,13 @@
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_container_fragment)
+ val mToolbar = findViewById<Toolbar>(R.id.default_toolbar)
+ setSupportActionBar(mToolbar)
+
val actionBar = supportActionBar
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true)
- actionBar.setIcon(R.drawable.ic_launcher)
- actionBar.show()
+ //actionBar.setIcon(R.drawable.ic_launcher)
}
if (savedInstanceState == null) {
supportFragmentManager.beginTransaction()
@@ -21,6 +28,17 @@
.add(R.id.fragment_container_view, BackupImportFragment::class.java, null)
.commit()
}
+
+ ViewCompat.setOnApplyWindowInsetsListener(
+ findViewById<View>(R.id.fragment_container_view),
+ this.applyBottomAndBordersInsetsListener
+ )
+
+ ViewCompat.setOnApplyWindowInsetsListener(mToolbar) { v: View?, windowInsets: WindowInsetsCompat? ->
+ val insets = windowInsets!!.getInsets(WindowInsetsCompat.Type.systemBars())
+ v?.updatePadding(top=insets.top)
+ windowInsets
+ }
}
}
\ No newline at end of file
diff --git a/app/src/main/java/it/reyboz/bustorino/ActivityIntro.kt b/app/src/main/java/it/reyboz/bustorino/ActivityIntro.kt
--- a/app/src/main/java/it/reyboz/bustorino/ActivityIntro.kt
+++ b/app/src/main/java/it/reyboz/bustorino/ActivityIntro.kt
@@ -6,6 +6,7 @@
import android.util.Log
import android.view.View
import android.widget.ImageButton
+import androidx.core.view.ViewCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
@@ -99,6 +100,10 @@
closeBottomButton.setOnClickListener {
closeIntroduction()
}
+ ViewCompat.setOnApplyWindowInsetsListener(
+ findViewById<View>(R.id.theConstraintLayout),
+ this.applyBottomAndBordersInsetsListener
+ )
}
diff --git a/app/src/main/java/it/reyboz/bustorino/ActivityPrincipal.java b/app/src/main/java/it/reyboz/bustorino/ActivityPrincipal.java
--- a/app/src/main/java/it/reyboz/bustorino/ActivityPrincipal.java
+++ b/app/src/main/java/it/reyboz/bustorino/ActivityPrincipal.java
@@ -27,10 +27,7 @@
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
-import android.view.Gravity;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
+import android.view.*;
import android.widget.FrameLayout;
import android.widget.Toast;
@@ -39,8 +36,8 @@
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
-import androidx.core.view.GravityCompat;
-import androidx.core.view.ViewCompat;
+import androidx.core.graphics.Insets;
+import androidx.core.view.*;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
@@ -92,7 +89,7 @@
*/
boolean showingArrivalsFromIntent = false;
- Toolbar mToolbar = findViewById(R.id.default_toolbar);
+ final Toolbar mToolbar = findViewById(R.id.default_toolbar);
setSupportActionBar(mToolbar);
if (getSupportActionBar()!=null)
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@@ -265,6 +262,54 @@
//last but not least, set the good default values
setDefaultSettingsValuesWhenMissing();
+ // handle the device "insets"
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.rootRelativeLayout), (v, windowInsets) -> {
+ Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
+ // Apply the insets as a margin to the view. This solution sets only the
+ // bottom, left, and right dimensions, but you can apply whichever insets are
+ // appropriate to your layout. You can also update the view padding if that's
+ // more appropriate.
+ ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
+ mlp.leftMargin = insets.left;
+ mlp.bottomMargin = insets.bottom;
+ mlp.rightMargin = insets.right;
+ v.setLayoutParams(mlp);
+ //set for toolbar
+ //mlp = (ViewGroup.MarginLayoutParams) mToolbar.getLayoutParams();
+ //mlp.topMargin = insets.top;
+ //mToolbar.setLayoutParams(mlp);
+ mToolbar.setPadding(0, insets.top, 0, 0);
+
+ // Return CONSUMED if you don't want the window insets to keep passing
+ // down to descendant views.
+ return WindowInsetsCompat.CONSUMED;
+ });
+
+ /*
+ ViewCompat.setOnApplyWindowInsetsListener(mToolbar, (v, windowInsets) -> {
+ Insets statusBarInsets = windowInsets.getInsets(WindowInsetsCompat.Type.statusBars());
+ // Apply the insets as a margin to the view.
+ ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
+ mlp.topMargin = statusBarInsets.top;
+ v.setLayoutParams(mlp);
+ v.setPadding(0, statusBarInsets.top, 0, 0);
+
+ // Return CONSUMED if you don't want the window insets to keep passing
+ // down to descendant views.
+ return WindowInsetsCompat.CONSUMED;
+ });
+
+ */
+ //to properly handle IME
+ WindowInsetsControllerCompat insetsController =
+ WindowCompat.getInsetsController(getWindow(), getWindow().getDecorView());
+
+ if (insetsController != null) {
+ insetsController.setSystemBarsBehavior(
+ WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
+ );
+ }
+
//check if first run activity (IntroActivity) has been started once or not
boolean hasIntroRun = theShPr.getBoolean(PreferencesHolder.PREF_INTRO_ACTIVITY_RUN,false);
diff --git a/app/src/main/java/it/reyboz/bustorino/ActivitySettings.java b/app/src/main/java/it/reyboz/bustorino/ActivitySettings.java
--- a/app/src/main/java/it/reyboz/bustorino/ActivitySettings.java
+++ b/app/src/main/java/it/reyboz/bustorino/ActivitySettings.java
@@ -1,21 +1,26 @@
package it.reyboz.bustorino;
import android.os.Bundle;
+import android.view.ViewGroup;
import androidx.appcompat.widget.Toolbar;
+import androidx.core.graphics.Insets;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowInsetsCompat;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import it.reyboz.bustorino.fragments.SettingsFragment;
+import it.reyboz.bustorino.middleware.GeneralActivity;
-public class ActivitySettings extends AppCompatActivity {
+public class ActivitySettings extends GeneralActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
- Toolbar mToolbar = findViewById(R.id.default_toolbar);
+ final Toolbar mToolbar = findViewById(R.id.default_toolbar);
setSupportActionBar(mToolbar);
ActionBar ab = getSupportActionBar();
if(ab!=null) {
@@ -29,6 +34,20 @@
FragmentTransaction ft = framan.beginTransaction();
ft.replace(R.id.setting_container,new SettingsFragment());
ft.commit();
+
+ ViewCompat.setOnApplyWindowInsetsListener(mToolbar, (v, windowInsets) -> {
+ Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
+
+ v.setPadding(0, insets.top, 0, 0);
+
+ // Return CONSUMED if you don't want the window insets to keep passing
+ // down to descendant views.
+ return WindowInsetsCompat.CONSUMED;
+ });
+
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.setting_container)
+ ,this.applyBottomAndBordersInsetsListener);
+
}
}
diff --git a/app/src/main/java/it/reyboz/bustorino/data/gtfs/GtfsDatabase.kt b/app/src/main/java/it/reyboz/bustorino/data/gtfs/GtfsDatabase.kt
--- a/app/src/main/java/it/reyboz/bustorino/data/gtfs/GtfsDatabase.kt
+++ b/app/src/main/java/it/reyboz/bustorino/data/gtfs/GtfsDatabase.kt
@@ -39,7 +39,8 @@
version = GtfsDatabase.VERSION,
autoMigrations = [
AutoMigration(from=2,to=3)
- ]
+ ],
+ exportSchema = true
)
@TypeConverters(Converters::class)
abstract class GtfsDatabase : RoomDatabase() {
diff --git a/app/src/main/java/it/reyboz/bustorino/fragments/CommonFragmentListener.java b/app/src/main/java/it/reyboz/bustorino/fragments/CommonFragmentListener.java
--- a/app/src/main/java/it/reyboz/bustorino/fragments/CommonFragmentListener.java
+++ b/app/src/main/java/it/reyboz/bustorino/fragments/CommonFragmentListener.java
@@ -1,11 +1,8 @@
package it.reyboz.bustorino.fragments;
-import android.location.Location;
-import android.view.View;
+import androidx.annotation.Nullable;
import it.reyboz.bustorino.backend.Stop;
-import javax.annotation.Nullable;
-
public interface CommonFragmentListener {
diff --git a/app/src/main/java/it/reyboz/bustorino/middleware/GeneralActivity.java b/app/src/main/java/it/reyboz/bustorino/middleware/GeneralActivity.java
--- a/app/src/main/java/it/reyboz/bustorino/middleware/GeneralActivity.java
+++ b/app/src/main/java/it/reyboz/bustorino/middleware/GeneralActivity.java
@@ -24,6 +24,11 @@
import android.content.pm.PackageManager;
import android.graphics.Rect;
import android.os.Build;
+import android.view.ViewGroup;
+import androidx.core.graphics.Insets;
+import androidx.core.view.OnApplyWindowInsetsListener;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowInsetsCompat;
import com.google.android.material.snackbar.Snackbar;
import androidx.annotation.Nullable;
@@ -188,4 +193,38 @@
}
}
+ protected OnApplyWindowInsetsListener applyBottomAndBordersInsetsListener = (v, windowInsets) -> {
+ Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
+ // Apply the insets as a margin to the view. This solution sets only the
+ // bottom, left, and right dimensions, but you can apply whichever insets are
+ // appropriate to your layout. You can also update the view padding if that's
+ // more appropriate.
+ ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
+ mlp.leftMargin = insets.left;
+ mlp.bottomMargin = insets.bottom;
+ mlp.rightMargin = insets.right;
+ v.setLayoutParams(mlp);
+ //set for toolbar
+
+ // Return CONSUMED if you don't want the window insets to keep passing
+ // down to descendant views.
+ return WindowInsetsCompat.CONSUMED;
+ };
+
+ protected OnApplyWindowInsetsListener applyBottomInsetsListener = (v, windowInsets) -> {
+ Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
+ // Apply the insets as a margin to the view. This solution sets only the
+ // bottom, left, and right dimensions, but you can apply whichever insets are
+ // appropriate to your layout. You can also update the view padding if that's
+ // more appropriate.
+ ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
+ mlp.bottomMargin = insets.bottom;
+ v.setLayoutParams(mlp);
+ //set for toolbar
+
+ // Return CONSUMED if you don't want the window insets to keep passing
+ // down to descendant views.
+ return WindowInsetsCompat.CONSUMED;
+ };
+
}
diff --git a/app/src/main/res/drawable/gradient_toolbar.xml b/app/src/main/res/drawable/gradient_toolbar.xml
new file mode 100644
--- /dev/null
+++ b/app/src/main/res/drawable/gradient_toolbar.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <gradient
+ android:startColor="?attr/colorPrimary"
+ android:endColor="?attr/colorPrimaryDark"
+ android:angle="90" />
+</shape>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml
--- a/app/src/main/res/layout/activity_about.xml
+++ b/app/src/main/res/layout/activity_about.xml
@@ -1,19 +1,34 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="it.reyboz.bustorino.ActivityAbout" android:orientation="vertical"
- android:gravity="center">
+ >
<!-- The ActionBar displayed at the top -->
+ <androidx.appcompat.widget.Toolbar
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/default_toolbar"
+ android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
+ android:background="@drawable/gradient_toolbar"
+ android:elevation="4dp"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
- <!-- <include
- layout="@layout/default_toobar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
- -->
+ android:fitsSystemWindows="false"
+ app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
<androidx.core.widget.NestedScrollView
- android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.9"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="0.9"
android:scrollbars="vertical"
+ android:id="@+id/aboutNestedScrollView"
+ app:layout_constraintTop_toBottomOf="@id/default_toolbar"
+ app:layout_constraintBottom_toTopOf="@id/theDivider"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ android:gravity="center"
>
<androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content"
android:paddingTop="10dp">
@@ -176,6 +191,7 @@
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:layout_marginTop="2dp"
+ app:layout_constraintTop_toBottomOf="@id/aboutNestedScrollView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/theDivider"
@@ -191,11 +207,11 @@
android:gravity="center_horizontal|center_vertical"
android:layout_marginLeft="20dp"
android:layout_marginStart="10dp"
- android:layout_below="@id/openTelegramButton"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/theDivider"
app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
android:textColor="@color/black" android:layout_marginTop="10dp" android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"/>
-</LinearLayout>
\ No newline at end of file
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_container_fragment.xml b/app/src/main/res/layout/activity_container_fragment.xml
--- a/app/src/main/res/layout/activity_container_fragment.xml
+++ b/app/src/main/res/layout/activity_container_fragment.xml
@@ -7,9 +7,20 @@
android:layout_height="match_parent"
tools:context=".ActivityExperiments">
+ <include
+ layout="@layout/default_toobar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentEnd="true"/>
+
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_container_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:layout_below="@id/default_toolbar"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentEnd="true"
/>
</RelativeLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_intro.xml b/app/src/main/res/layout/activity_intro.xml
--- a/app/src/main/res/layout/activity_intro.xml
+++ b/app/src/main/res/layout/activity_intro.xml
@@ -1,12 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".ActivityIntro"
+>
<androidx.constraintlayout.widget.ConstraintLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/theConstraintLayout"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".ActivityIntro">
-
+ android:layout_height="match_parent">
+ <!-- Maybe the three bottom element could be grouped together into a single layout? -->
<ImageButton
android:src="@drawable/arrow_forward_white"
android:rotation="180"
@@ -15,7 +19,8 @@
android:backgroundTint="?colorAccent"
android:textColor="@color/white"
android:contentDescription="@string/previous"
- app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent"/>
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"/>
<ImageButton
android:src="@drawable/arrow_forward_white"
android:layout_width="wrap_content"
@@ -25,7 +30,8 @@
app:circularflow_radiusInDP="5dp"
android:contentDescription="@string/next"
- app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent"/>
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
<ImageButton
android:src="@drawable/close_white_large"
@@ -56,4 +62,5 @@
app:layout_constraintLeft_toRightOf="@id/btnPrevious"
app:layout_constraintRight_toLeftOf="@id/btnNext"
/>
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
+</androidx.constraintlayout.widget.ConstraintLayout>
+</RelativeLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_principal.xml b/app/src/main/res/layout/activity_principal.xml
--- a/app/src/main/res/layout/activity_principal.xml
+++ b/app/src/main/res/layout/activity_principal.xml
@@ -5,6 +5,7 @@
android:id="@+id/drawer_layout"
android:layout_height="match_parent">
<RelativeLayout
+ android:id="@+id/rootRelativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -24,7 +25,7 @@
android:layout_below="@id/default_toolbar"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
@@ -44,9 +45,9 @@
app:itemIconTint="@color/teal_500"
app:itemTextAppearance="?android:attr/textAppearanceMedium"
app:itemTextColor="@color/black_900"
- android:fitsSystemWindows="true"
+ android:fitsSystemWindows="false"
app:menu="@menu/drawer_main" />
</androidx.drawerlayout.widget.DrawerLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/default_toobar.xml b/app/src/main/res/layout/default_toobar.xml
--- a/app/src/main/res/layout/default_toobar.xml
+++ b/app/src/main/res/layout/default_toobar.xml
@@ -6,10 +6,10 @@
android:layout_height="?attr/actionBarSize"
android:id="@+id/default_toolbar"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
- android:background="?attr/colorPrimary"
- android:fitsSystemWindows="true"
+ android:background="?attr/colorPrimaryDark"
+ android:fitsSystemWindows="false"
android:elevation="4dp"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
</androidx.appcompat.widget.Toolbar>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_test_saving.xml b/app/src/main/res/layout/fragment_test_saving.xml
--- a/app/src/main/res/layout/fragment_test_saving.xml
+++ b/app/src/main/res/layout/fragment_test_saving.xml
@@ -19,6 +19,7 @@
android:layout_marginBottom="50dp"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintVertical_chainStyle="packed"
+ android:backgroundTint="?attr/colorAccent"
/>
@@ -55,9 +56,10 @@
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="18dp"
app:layout_constraintVertical_bias="0.0"
+ android:backgroundTint="?attr/colorAccent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/values-v35/styles.xml b/app/src/main/res/values-v35/styles.xml
--- a/app/src/main/res/values-v35/styles.xml
+++ b/app/src/main/res/values-v35/styles.xml
@@ -3,7 +3,6 @@
<!--
This forces the app to not use Edge-to-Edge. However, on API 36 it will be ignored!
-->
- <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>
@@ -11,7 +10,6 @@
<!--
This forces the app to not use Edge-to-Edge. However, on API 36 it will be ignored!
-->
- <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>
</resources>
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -5,7 +5,7 @@
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
- <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <style name="AppBaseTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
diff --git a/app/src/main/res/values/theme.xml b/app/src/main/res/values/theme.xml
--- a/app/src/main/res/values/theme.xml
+++ b/app/src/main/res/values/theme.xml
@@ -1,30 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <style name="FavTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <style name="FavTheme" parent="AppMaterialTheme.NoActionBar">
<item name="colorPrimary">@color/blue_500</item>
<item name="colorPrimaryDark">@color/blue_700</item>
<item name="colorAccent">@color/teal_500</item>
</style>
- <style name="AboutTheme" parent="AppMaterialTheme">
+ <style name="AboutTheme" parent="AppMaterialTheme.NoActionBar">
<item name="colorPrimary">@color/teal_500</item>
<item name="colorPrimaryDark">@color/teal_900</item>
<item name="colorAccent">@color/blue_700</item>
<item name="colorOnPrimary">@color/white</item>
-
</style>
- <style name="MapTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <style name="MapTheme" parent="AppMaterialTheme.NoActionBar">
<item name="colorPrimary">@color/orange_500</item>
<item name="colorPrimaryDark">@color/orange_700</item>
<item name="colorAccent">@color/teal_500</item>
<item name="colorOnPrimary">@color/white</item>
-
</style>
<style name="preferenceTheme" parent="PreferenceThemeOverlay"></style>
+ <style name="AppTheme.NoActionBar.Light" parent="AppTheme.NoActionBar">
+ <item name="android:windowLightStatusBar">true</item>
+ </style>
+
</resources>
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
--- a/build.gradle
+++ b/build.gradle
@@ -9,33 +9,34 @@
}
- //TODO: Migrate tfrom kapt to KSP
//kotlin
- ext.kotlin_version = '2.1.10'
+ ext.kotlin_version = '2.2.20'
ext.coroutines_version = "1.10.2"
dependencies {
- classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.4' // or latest
- classpath 'com.android.tools.build:gradle:8.6.1'
+ classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.5' // or latest
+ classpath 'com.android.tools.build:gradle:8.12.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:$kotlin_version-2.0.4"
+
}
}
ext {
- androidXTestVersion = "1.5.0"
+ androidXTestVersion = "1.7.0"
//multidex
multidex_version = "2.0.1"
//libraries versions
- fragment_version = "1.6.1"
- activity_version = "1.7.2"
- appcompat_version = "1.7.0"
+ fragment_version = "1.8.9"
+ activity_version = "1.11.0"
+ appcompat_version = "1.7.1"
preference_version = "1.2.1"
- work_version = "2.9.0"
+ work_version = "2.11.0"
- acra_version = "5.11.3"
- lifecycle_version = "2.7.0"
+ acra_version = "5.13.1"
+ lifecycle_version = "2.9.4"
arch_version = "2.1.0"
- room_version = "2.5.2"
+ room_version = "2.8.3"
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 16, 06:38 (13 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1750919
Default Alt Text
D201.1773639530.diff (36 KB)
Attached To
Mode
D201: Upgrade to latest version of libraries, patch edge-to-edge
Attached
Detach File
Event Timeline
Log In to Comment