weddingparty / AndroidFloatLabel

Float Label Edit Texts for Android
Apache License 2.0
425 stars 49 forks source link

Change code formatting and fixed bug with the sample app #6

Closed davidjrichardson closed 9 years ago

davidjrichardson commented 10 years ago

I've changed the code style to be a little more in-line with the Google AOSP code style guidelines. More specifcally, I've changed it so all lines are less than 100 characters as outlined here: https://source.android.com/source/code-style.html#limit-line-length

I have also fixed an issue with the sample app where the centre gravity field had no hint defined within the XML.

kaushikgopal commented 10 years ago

:) hmm.. this is a tough one. Some thoughts:

What are these rules you ask? I've been working/tweaking on them for sometime now, and have them up on another repo: https://github.com/kaushikgopal/jetbrains_env

Those rules are basically for Android Studio. I hit a command and boom, the code is formatted to the rules specified. That's how i tackle consistency.

Thoughts?

davidjrichardson commented 10 years ago

Those are fair points in regards to formatting and I agree that consistency is key when it comes to code readability. The main issue right now (in my opinion) is that the existing code has potentially quite long line lengths or the large indentations used for method parameters (although this could just be another personal preference).

As an aside, the existing code doesn't seem to follow your provided formatting rules. :)