pawegio / KAndroid

Kotlin library for Android
Apache License 2.0
896 stars 81 forks source link

invisible property and show()/hide() methods added for View #24

Closed illuzor closed 7 years ago

illuzor commented 7 years ago

Additional for #23 Not sure what do you think about it. I believe it will be useful.

pawegio commented 7 years ago

I would prefer to keep just one way to update visibility to stay concise. I like show()/hide() methods, because it allows to set View.INVISIBLE state.

illuzor commented 7 years ago

I have to remove invisible? Or just close this pull request? Or maybe remove visible and invisible and leave hide()/show()? I don`t clearly understand.

pawegio commented 7 years ago

I suggest removing visible/invisible properties and keep hide()/show() methods. What do you think?

illuzor commented 7 years ago

I agree about invisible. Two properties with opposite values is not good. I suggest keep hide()/show() and visible. visible may be useful for situations like this:

myView.visible = someInt > 3

But this is your library and final decision is yours.

pawegio commented 7 years ago

Ok, thanks for providing a use case. Now I am convinced to keep both visible and show()/hide(). Only invisible seems redundant to me.

pawegio commented 7 years ago

So remove invisible and I'll merge it. 🙂

pawegio commented 7 years ago

👍