Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLAG_KEEP_SCREEN_ON is not propagated from resource attribute #2012

Closed
emartynov opened this issue Aug 31, 2015 · 1 comment
Closed

FLAG_KEEP_SCREEN_ON is not propagated from resource attribute #2012

emartynov opened this issue Aug 31, 2015 · 1 comment

Comments

@emartynov
Copy link

The issues comes from SO question:
http://stackoverflow.com/questions/32303361/test-for-keepscreenon-attribute

I've tried to reproduce it and also looked to Robolectric sources.
Flag is there if you set it programmatically:

        getWindow().addFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON );

but missed if it is set in resource attributes:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                ...
                android:keepScreenOn="true"
                ...
                tools:context=".MainActivity">
@jongerrish
Copy link
Contributor

Resource handling has been vastly improved with Robolectric 4.0 and binary resources, give that a try..

Closing this as it hasn't been updated in a while. If its still an issue with Robolectric 4.0 please reopen with a reproducible test case and we'll prioritize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants