Mercurial > dwindows
comparison android/DWindows.kt @ 2503:1c2a79313b04
Android: Implment dw_window_hide/show(). Set the initial visibility to GONE.
The window won't be laid out until dw_window_show() is called on the window.
Put the dwindowsInit() hack back in... keep hoping some of these changes
will fix it, but it persists. HTML mostly works, but getting cache miss?
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 06 May 2021 10:39:55 +0000 |
parents | b6319aed3298 |
children | a149dabf6a1f |
comparison
equal
deleted
inserted
replaced
2502:b6319aed3298 | 2503:1c2a79313b04 |
---|---|
121 if (firstWindow) { | 121 if (firstWindow) { |
122 waitOnUiThread { | 122 waitOnUiThread { |
123 var dataArrayMap = SimpleArrayMap<String, Long>() | 123 var dataArrayMap = SimpleArrayMap<String, Long>() |
124 windowLayout = LinearLayout(this) | 124 windowLayout = LinearLayout(this) |
125 | 125 |
126 windowLayout!!.visibility = View.GONE | |
126 windowLayout!!.tag = dataArrayMap | 127 windowLayout!!.tag = dataArrayMap |
127 setContentView(windowLayout) | 128 setContentView(windowLayout) |
128 this.title = title | 129 this.title = title |
129 // For now we just return our DWindows' main activity layout... | 130 // For now we just return our DWindows' main activity layout... |
130 // in the future, later calls should create new activities | 131 // in the future, later calls should create new activities |
197 // TODO: Make sure this is actually the top-level layout, not just a box | 198 // TODO: Make sure this is actually the top-level layout, not just a box |
198 text = this.title.toString() | 199 text = this.title.toString() |
199 } | 200 } |
200 } | 201 } |
201 return text | 202 return text |
203 } | |
204 | |
205 fun windowHideShow(window: View, state: Int) | |
206 { | |
207 waitOnUiThread { | |
208 if(state == 0) { | |
209 window.visibility = View.GONE | |
210 } else { | |
211 window.visibility = View.VISIBLE | |
212 } | |
213 } | |
202 } | 214 } |
203 | 215 |
204 fun clipboardGetText(): String { | 216 fun clipboardGetText(): String { |
205 var cm: ClipboardManager = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager | 217 var cm: ClipboardManager = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager |
206 var clipdata = cm.primaryClip | 218 var clipdata = cm.primaryClip |