Skip to content

Commit b5ec627

Browse files
committed
tweaking UI
1 parent 1bfad26 commit b5ec627

File tree

13 files changed

+33
-24
lines changed

13 files changed

+33
-24
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
applicationId "com.jvdegithub.aiscatcher"
1111
minSdk 23
1212
targetSdk 32
13-
versionCode 58
14-
versionName '0.58'
13+
versionCode 60
14+
versionName '0.60'
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
externalNativeBuild {

app/src/main/java/com/jvdegithub/aiscatcher/AisCatcherJava.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* AIS-catcher for Android
3-
* Copyright (C) 2022 jvde.github@gmail.com.
3+
* Copyright (C) 2022-2023 jvde.github@gmail.com.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

app/src/main/java/com/jvdegithub/aiscatcher/AisService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* AIS-catcher for Android
3-
* Copyright (C) 2022 jvde.github@gmail.com.
3+
* Copyright (C) 2022-2023 jvde.github@gmail.com.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

app/src/main/java/com/jvdegithub/aiscatcher/DeviceManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* AIS-catcher for Android
3-
* Copyright (C) 2022 jvde.github@gmail.com.
3+
* Copyright (C) 2022-2023 jvde.github@gmail.com.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

app/src/main/java/com/jvdegithub/aiscatcher/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* AIS-catcher for Android
3-
* Copyright (C) 2022 jvde.github@gmail.com.
3+
* Copyright (C) 2022-2023 jvde.github@gmail.com.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

app/src/main/java/com/jvdegithub/aiscatcher/Settings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* AIS-catcher for Android
3-
* Copyright (C) 2022 jvde.github@gmail.com.
3+
* Copyright (C) 2022-2023 jvde.github@gmail.com.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

app/src/main/java/com/jvdegithub/aiscatcher/ui/main/StatisticsFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* AIS-catcher for Android
3-
* Copyright (C) 2022 jvde.github@gmail.com.
3+
* Copyright (C) 2022-2023 jvde.github@gmail.com.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

app/src/main/java/com/jvdegithub/aiscatcher/ui/main/WebViewMapFragment.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.jvdegithub.aiscatcher.ui.main;
22

3+
import android.app.UiModeManager;
34
import android.content.Context;
45
import android.graphics.Bitmap;
56
import android.net.ConnectivityManager;
@@ -76,8 +77,15 @@ public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
7677
}
7778
});
7879

80+
String url = "http://localhost:" + MainActivity.port + "?welcome=false&android=true";
7981

80-
webView.loadUrl("http://localhost:" + MainActivity.port + "?welcome=false&android=true");
82+
UiModeManager uiManager = (UiModeManager) getContext().getSystemService(Context.UI_MODE_SERVICE);
83+
boolean isDarkMode = (uiManager.getNightMode() == UiModeManager.MODE_NIGHT_YES);
84+
85+
if (isDarkMode) {
86+
url += "&dark_mode=true&map=DarkMatter";
87+
}
88+
webView.loadUrl(url);
8189

8290
return rootView;
8391
}

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
android:id="@+id/bottombar"
4343
android:layout_width="match_parent"
4444
android:layout_height="wrap_content"
45-
android:background="@color/maastrichtblue"
45+
android:background="?attr/colorPrimaryVariant"
4646
app:itemIconTint="@color/white"
4747
app:itemTextColor="@color/white"
4848
app:labelVisibilityMode="labeled"

0 commit comments

Comments
 (0)