Skip to content

RF Sentinel (RFSentinel): free, open-source police detector app for Android. Spots police body cams, Flock ALPR cameras, AirTag trackers, Remote ID drones, smart glasses and fake cell towers from Bluetooth LE and WiFi. No root.

WiGLE results: Worldwide button label fits (less padding, shrinks before cutting)

CIS-C07334ce423995
diff --git a/app/src/main/java/com/rfsentinel/app/probes/WigleUi.kt b/app/src/main/java/com/rfsentinel/app/probes/WigleUi.kt
index 0465e28..034b391 100644
--- a/app/src/main/java/com/rfsentinel/app/probes/WigleUi.kt
+++ b/app/src/main/java/com/rfsentinel/app/probes/WigleUi.kt
@@ -221,7 +221,12 @@ object WigleUi {
setPadding(px(16), px(8), px(16), px(12))
fun button(label: String, filled: Boolean, onClick: () -> Unit) = addView(
(if (filled) MaterialButton(a) else MaterialButton(a, null, com.google.android.material.R.attr.materialButtonOutlinedStyle)).apply {
- this.text = label; maxLines = 1; ellipsize = TextUtils.TruncateAt.END
+ // Three buttons on a narrow phone: less side padding, and the label shrinks before it's cut.
+ this.text = label; maxLines = 1
+ minWidth = 0; minimumWidth = 0
+ setPaddingRelative(px(6), paddingTop, px(6), paddingBottom)
+ androidx.core.widget.TextViewCompat.setAutoSizeTextTypeUniformWithConfiguration(
+ this, 10, 14, 1, TypedValue.COMPLEX_UNIT_SP)
setOnClickListener { sheet.dismiss(); onClick() }
},
LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1f).apply { marginStart = px(4); marginEnd = px(4) })