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

Why are disabled elements seen as not displayed ? #487

Closed
lragnarsson opened this issue Jul 18, 2014 · 4 comments
Closed

Why are disabled elements seen as not displayed ? #487

lragnarsson opened this issue Jul 18, 2014 · 4 comments

Comments

@lragnarsson
Copy link
Contributor

Is there a reason to include the enabled attribute in this check? Disabled edit_texts for example will return false but they are clearly "displayed" on the screen.

Thank you.

@lukeis
Copy link
Member

lukeis commented Jul 18, 2014

in general for the native components if it's not enabled it's not rendered on the screen. You've found the exception to the rule :) (I also don't know how many other exceptions there are to this)

We'll likely need to check if the View is a particular type that could be displayed and then not check the enabled flag.

@lukeis
Copy link
Member

lukeis commented Jul 18, 2014

http://developer.android.com/reference/android/view/View.html#isEnabled()
"The interpretation of the enabled state varies by subclass."

This doesn't help :(

@lragnarsson
Copy link
Contributor Author

Hmm, is there any cases where the enabled attribute is the only attribute deciding the visibility of a view? If not then the check might be redundant.

@lragnarsson
Copy link
Contributor Author

I don't think the enabled attribute ever determines the visibility of a view. I also think that the

(View.VISIBLE == getView().getVisibility())

part on line 100 is unnecessary as it is already checked in the isShown method

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