Skip to content

Commit 2746051

Browse files
committed
Refactor DarkModeListener to use dynamic activity class namespace and standardize method signature formatting
1 parent c58d195 commit 2746051

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • pythonforandroid/recipes/android/src/android

pythonforandroid/recipes/android/src/android/darkmode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class DarkModeListener(PythonJavaClass):
2222
indicating whether dark mode is currently enabled.
2323
"""
2424
__javacontext__ = "app"
25-
__javainterfaces__ = ["org/kivy/android/PythonActivity$DarkModeListener"]
25+
__javainterfaces__ = [ACTIVITY_CLASS_NAMESPACE + '$DarkModeListener']
2626

2727
def __init__(self, on_dark_mode_changed: Callable[[bool], None]):
2828
self.on_dark_mode_changed = on_dark_mode_changed
2929

30-
@java_method("(Z)V")
30+
@java_method('(Z)V')
3131
def onDarkModeChanged(self, is_dark_mode):
3232
self.on_dark_mode_changed(is_dark_mode)
3333

0 commit comments

Comments
 (0)