changeset 2590:8352c38bc20b

Android: Turn off Android's forcing buttons and tabs to be all caps.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 25 May 2021 01:25:32 +0000
parents e879afecf3ab
children f3d423cdbc2e
files android/DWindows.kt
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/android/DWindows.kt	Mon May 24 23:53:04 2021 +0000
+++ b/android/DWindows.kt	Tue May 25 01:25:32 2021 +0000
@@ -1393,6 +1393,7 @@
             val dataArrayMap = SimpleArrayMap<String, Long>()
 
             button!!.tag = dataArrayMap
+            button!!.isAllCaps = false
             button!!.text = text
             button!!.id = cid
             button!!.setOnClickListener {
@@ -1767,6 +1768,20 @@
         return pageID
     }
 
+    fun notebookCapsOff(view: View?) {
+        if (view !is ViewGroup) {
+            return
+        }
+        for (i in 0 until view.childCount) {
+            val child = view.getChildAt(i)
+            if (child is TextView) {
+                child.isAllCaps = false
+            } else {
+                notebookCapsOff(child)
+            }
+        }
+    }
+
     fun notebookPageDestroy(notebook: RelativeLayout, pageID: Long)
     {
         waitOnUiThread {
@@ -1817,6 +1832,8 @@
                 if (tab != null) {
                     tab.text = text
                 }
+
+                notebookCapsOff(tabs)
             }
         }
     }