comparison android/DWindows.kt @ 2607:3b9bbd69bb9c

Android: Implement dw_menu_popup() ... still need to implement the context events.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 16 Jul 2021 02:58:43 +0000
parents 60ec91d23746
children a11522c30345
comparison
equal deleted inserted replaced
2606:6c30fcc79402 2607:3b9bbd69bb9c
828 fun darkModeDetected(): Int 828 fun darkModeDetected(): Int
829 { 829 {
830 return darkMode 830 return darkMode
831 } 831 }
832 832
833 fun menuPopup(menu: DWMenu, parent: View, x: Int, y: Int)
834 {
835 runOnUiThread {
836 val popup = PopupMenu(this, parent)
837
838 menu.createMenu(popup.menu)
839 popup.show()
840 }
841 }
842
833 fun menuBarNew(location: View): DWMenu? 843 fun menuBarNew(location: View): DWMenu?
834 { 844 {
835 // TODO: Make sure location is this activity 845 // TODO: Make sure location is this activity
836 return menuBar 846 return menuBar
837 } 847 }