You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def set_status_bar_colour(self):
try:
# Turn status bar green
from jnius import autoclass
from jnius.jnius import JavaException
#try:
LayoutParams = autoclass('android.view.WindowManager$LayoutParams')
R = autoclass('android.R')
activity = autoclass('org.kivy.android.PythonActivity').mActivity
window = activity.getWindow()
LayoutParams = window.getAttributes()
window.clearFlags(LayoutParams.FLAG_TRANSLUCENT_STATUS)
window.addFlags(LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
window.setStatusBarColor(activity.getResources().getColor(R.color.holo_green_light))
#except JavaException as ex:
# Insufficient SDK version
#pass
except ImportError:
# Not on Android
pass
The full error I get is AttributeError: 'android.view.WindowManager$LayoutParams' object has no attribute 'FLAG_TRANSLUCENT_STATUS'. The relevant part of the adb logcat output can be found here.
If anyone is wondering why I'm using autoclass('android.view.WindowManager$LayoutParams') as opposed to autoclass('android.view.WindowManager.LayoutParams'): The second verison would also give me an AttributeError.
👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.
Here is the relevant part of my code:
The full error I get is
AttributeError: 'android.view.WindowManager$LayoutParams' object has no attribute 'FLAG_TRANSLUCENT_STATUS'
. The relevant part of theadb logcat
output can be found here.If anyone is wondering why I'm using autoclass('android.view.WindowManager$LayoutParams') as opposed to autoclass('android.view.WindowManager.LayoutParams'): The second verison would also give me an AttributeError.
Any help is appreciated!
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: