changeset 2516:8f5d064b7054

Android: Fix the down arrow on the comboboxes, found a system resource that works. Also use system resources for "Ok" and "Cancel" ... the "Yes" and "No" are wrong... and deprecated so those are hardcoded and not localized for now.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 08 May 2021 01:54:52 +0000
parents 211044d98e86
children d746323f2841
files android/DWindows.kt
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/android/DWindows.kt	Sat May 08 01:15:54 2021 +0000
+++ b/android/DWindows.kt	Sat May 08 01:54:52 2021 +0000
@@ -89,7 +89,7 @@
     var list = mutableListOf<String>()
 
     init {
-        //setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.unfold, 0);
+        setCompoundDrawablesWithIntrinsicBounds(0, 0, android.R.drawable.arrow_down_float, 0);
         setOnTouchListener(this)
         lpw = ListPopupWindow(context)
         lpw!!.setAdapter(
@@ -1092,8 +1092,8 @@
             alert.setTitle(title)
             alert.setMessage(body)
             if ((flags and (1 shl 3)) != 0) {
-                alert.setPositiveButton(
-                    "Yes",
+                alert.setPositiveButton("Yes",
+                    //android.R.string.yes,
                     DialogInterface.OnClickListener { _: DialogInterface, _: Int ->
                         retval = 1
                         throw java.lang.RuntimeException()
@@ -1101,15 +1101,15 @@
             }
             if ((flags and ((1 shl 1) or (1 shl 2))) != 0) {
                 alert.setNegativeButton(
-                    "Ok",
+                    android.R.string.ok,
                     DialogInterface.OnClickListener { _: DialogInterface, _: Int ->
                         retval = 0
                         throw java.lang.RuntimeException()
                     });
             }
             if ((flags and ((1 shl 3) or (1 shl 4))) != 0) {
-                alert.setNegativeButton(
-                    "No",
+                alert.setNegativeButton("No",
+                    //android.R.string.no,
                     DialogInterface.OnClickListener { _: DialogInterface, _: Int ->
                         retval = 0
                         throw java.lang.RuntimeException()
@@ -1117,7 +1117,7 @@
             }
             if ((flags and ((1 shl 2) or (1 shl 4))) != 0) {
                 alert.setNeutralButton(
-                    "Cancel",
+                    android.R.string.cancel,
                     DialogInterface.OnClickListener { _: DialogInterface, _: Int ->
                         retval = 2
                         throw java.lang.RuntimeException()