diff --git a/app/src/main/java/com/wytehat/btlogger/MapActivity.java b/app/src/main/java/com/wytehat/btlogger/MapActivity.java
index 3fce641..368809b 100644
--- a/app/src/main/java/com/wytehat/btlogger/MapActivity.java
+++ b/app/src/main/java/com/wytehat/btlogger/MapActivity.java
@@ -511,12 +511,12 @@ private void buildFilterPanel() {
row1.addView(
startDateButton,
- weightParams()
+ tallWeightParams()
);
row1.addView(
endDateButton,
- weightParams()
+ tallWeightParams()
);
filterPanel.addView(row1);
@@ -536,12 +536,12 @@ private void buildFilterPanel() {
row2.addView(
startTimeButton,
- weightParams()
+ tallWeightParams()
);
row2.addView(
endTimeButton,
- weightParams()
+ tallWeightParams()
);
filterPanel.addView(row2);
@@ -1103,13 +1103,28 @@ private TextView filterLabel(
private Button makeFilterButton(
String text) {
- Button button =
- new Button(this);
+ Button button =
+ new Button(this);
- button.setText(text);
- button.setTextSize(13);
+ button.setText(text);
+ button.setTextSize(11);
- return button;
+ /*
+ * These carry a two-line label ("From\nAug 19, 2026"). Buttons
+ * upper-case their text by default, which is what pushed the date
+ * past the edge, and the stock horizontal padding costs another
+ * ~32dp of the half-width the button actually gets.
+ */
+ button.setTransformationMethod(null);
+
+ button.setPadding(
+ dp(4),
+ dp(2),
+ dp(4),
+ dp(2)
+ );
+
+ return button;
}
private LinearLayout.LayoutParams weightParams() {
@@ -1121,6 +1136,19 @@ private LinearLayout.LayoutParams weightParams() {
);
}
+/**
+ * Equal width, but tall enough for the text it holds -- the date and
+ * time buttons carry two lines and a fixed height clips the second.
+ */
+private LinearLayout.LayoutParams tallWeightParams() {
+
+ return new LinearLayout.LayoutParams(
+ 0,
+ LinearLayout.LayoutParams.WRAP_CONTENT,
+ 1
+ );
+}
+
private void showDatePicker(
final boolean start) {
diff --git a/app/src/main/java/com/wytehat/btlogger/MapHtmlBuilder.java b/app/src/main/java/com/wytehat/btlogger/MapHtmlBuilder.java
index 625cb75..59a6a2b 100644
--- a/app/src/main/java/com/wytehat/btlogger/MapHtmlBuilder.java
+++ b/app/src/main/java/com/wytehat/btlogger/MapHtmlBuilder.java
@@ -304,6 +304,21 @@ public final class MapHtmlBuilder {
// Popups
// ------------------------------------------------------------------
+ /**
+ * Coordinates as a tappable geo: link. MapActivity's WebViewClient
+ * intercepts geo: and hands it to the maps app, so every popup that
+ * shows a position should use this rather than plain text.
+ */
+ private static String gpsLink(double latitude, double longitude) {
+
+ return "GPS: "
+ + latitude + ", " + longitude
+ + "";
+ }
+
private static String devicePopup(
DeviceRecord record,
double latitude,
@@ -325,19 +340,7 @@ public final class MapHtmlBuilder {
.append(MapFormat.htmlText(record.displayName()))
.append("
");
- html.append("GPS: ")
- .append(latitude)
- .append(", ")
- .append(longitude)
- .append("");
+ html.append(gpsLink(latitude, longitude));
if (record.accuracy > 0) {
@@ -393,8 +396,6 @@ public final class MapHtmlBuilder {
if (options.normalizedMode) {
- html.append("
View: Normalized");
-
html.append("
Normalization: ")
.append(MapFormat.htmlText(
HistoryNormalizer.levelName(options.aggressiveness)));
@@ -426,10 +427,10 @@ public final class MapHtmlBuilder {
.append(MapFormat.htmlText(MapFormat.date(time)));
}
- html.append("
GPS: ")
- .append(decision.point.latitude)
- .append(", ")
- .append(decision.point.longitude);
+ html.append("
")
+ .append(gpsLink(
+ decision.point.latitude,
+ decision.point.longitude));
html.append("
Distance from previous accepted point: ")
.append(MapFormat.number(decision.distanceMeters))
@@ -499,10 +500,8 @@ public final class MapHtmlBuilder {
.append(MapFormat.htmlText(MapFormat.date(time)));
}
- html.append("
GPS: ")
- .append(point.latitude)
- .append(", ")
- .append(point.longitude);
+ html.append("
")
+ .append(gpsLink(point.latitude, point.longitude));
double accuracy =
HistoryNormalizer.pointDouble(point, "accuracy", -1);