We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Meaning:
view.setVisibility = View.VISIBLE -> view.isVisible = true view.setVisibility = View.GONE -> view.isVisible = false view.setVisibility = View.INVISIBLE -> view.isInvisible = true
view.setVisibility = View.VISIBLE
view.isVisible = true
view.setVisibility = View.GONE
view.isVisible = false
view.setVisibility = View.INVISIBLE
view.isInvisible = true
And also the getter:
if(view.visibility==View.VISIBLE) -> if(view.isVisible) if(view.visibility==View.GONE) -> if(view.isGone) if(view.visibility==View.INVISIBLE) -> if(view.isInvisible )
if(view.visibility==View.VISIBLE)
if(view.isVisible)
if(view.visibility==View.GONE)
if(view.isGone)
if(view.visibility==View.INVISIBLE)
if(view.isInvisible )
And the negated forms.
This is only to make code shorter and cleaner, of course. If you check its code, it does about the same...
The text was updated successfully, but these errors were encountered:
Where these properties come from? ktx?
Sorry, something went wrong.
@Miha-x64 When you create a new project, don't you see them?
I can see this line when using it, if that helps:
import androidx.core.view.isVisible
Doesn't this inspection satisfy your needs? Android | Lint | Productivity | KTX Extension Available
Unfortunately, it doesn't work on the fly. And I keep it disabled because I prefer not to use ktx.
@Miha-x64 It doesn't offer this. I don't know what it covers.
@AndroidDeveloperLB, don't you mind building a list of methods and replacements you want to be suggested?
I don't know of any other examples. I just noticed them, so I thought I should use them instead, as it looks nicer :)
No branches or pull requests
Meaning:
view.setVisibility = View.VISIBLE
->view.isVisible = true
view.setVisibility = View.GONE
->view.isVisible = false
view.setVisibility = View.INVISIBLE
->view.isInvisible = true
And also the getter:
if(view.visibility==View.VISIBLE)
->if(view.isVisible)
if(view.visibility==View.GONE)
->if(view.isGone)
if(view.visibility==View.INVISIBLE)
->if(view.isInvisible )
And the negated forms.
This is only to make code shorter and cleaner, of course. If you check its code, it does about the same...
The text was updated successfully, but these errors were encountered: