Mercurial > dwindows
diff android/DWindows.kt @ 2689:7127de139acf
Android: Implement groupbox using RadioGroup... still missing the title and
visible border seen on most other platforms, but it works for making sure
radiobuttons contained inside only have one selected.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 28 Oct 2021 17:27:59 +0000 |
parents | c359cbd0b20f |
children | 755d9ad07aaf |
line wrap: on
line diff
--- a/android/DWindows.kt Thu Oct 28 00:22:42 2021 +0000 +++ b/android/DWindows.kt Thu Oct 28 17:27:59 2021 +0000 @@ -1635,6 +1635,28 @@ return box } + fun groupBoxNew(type: Int, pad: Int, title: String?): LinearLayout? { + var box: LinearLayout? = null + waitOnUiThread { + box = RadioGroup(this) + val dataArrayMap = SimpleArrayMap<String, Long>() + + box!!.tag = dataArrayMap + box!!.layoutParams = + LinearLayout.LayoutParams( + LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.WRAP_CONTENT + ) + if (type > 0) { + box!!.orientation = LinearLayout.VERTICAL + } else { + box!!.orientation = LinearLayout.HORIZONTAL + } + box!!.setPadding(pad, pad, pad, pad) + } + return box + } + fun scrollBoxNew(type: Int, pad: Int) : ScrollView? { var scrollBox: ScrollView? = null