DEV Community

Ildarov
Ildarov

Posted on

My first published library in the Android arsenal

Hello Guys!

Yesterday my first library published in Android-arsenal. It is a really impressive feeling when you've done something original and may be useful for someone.

Here is my library in android-arsenal: Android-arsenal-FillingButton
and here is in Github: FillingButton

Top comments (3)

Collapse
 
neokleoys2005 profile image
Giorgos Neokleous • Edited

Congrats!

I've got a question which you might want to address in your README.md.

Why does the library need an ACCESS_NETWORK_STATE permission? I'm guessing it has to do with InternetSensableButton.

Also, the library lacks documentation. Although simple, it gives zero info to the implementator what for example InternetSensableButton does.

Edit:
Comments on implementation

connected.also {
                when(it){
                    true -> button.alpha = 1f
                    false -> button.alpha = disabledAlpha
                }
            }

connected is a non-nullable boolean, the also adds redundant verbosity to the logic.
Also, I think a simple if-else will be cleaner here. When-statement is fantastic but it's not the one stop for all conditional logic.

Collapse
 
devit951 profile image
Ildarov

Thanks for the response.
On a weekend I will fix README, to describe new button type "InernetSensableButton". The reason why I couldn't because I didn't have enough free time.

Collapse
 
devit951 profile image
Ildarov

Done.