dmytrodanylyk / android-process-button

Android Buttons With Built-in Progress Meters.
http://dmytrodanylyk.com/pages/portfolio/portfolio-process-button.html
MIT License
3k stars 545 forks source link

Progress color always matching Normal color #33

Closed pakoito closed 9 years ago

pakoito commented 9 years ago

This is my button

    <com.dd.processbutton.iml.ActionProcessButton
        pb:pb_colorPressed="@android:color/transparent"
        pb:pb_colorComplete="@color/blue"
        pb:pb_textComplete="@string/complete"
        pb:pb_colorError="@color/red"
        pb:pb_textError="@string/error"
        pb:pb_colorProgress="@color/blue"
        pb:pb_textProgress="@string/progress"
        pb:pb_colorNormal="@color/green"
        android:text="@string/confirm_idle" />

the progress state shows as green for some reason. I'm not setting the colors again in code or anything.

dmytrodanylyk commented 9 years ago

Try to run sample app and check if issues remains.

pakoito commented 9 years ago

The issue is in the sample app too: http://imgur.com/a/tlAtW

dmytrodanylyk commented 9 years ago

@pakoito sorry, I can't reproduce this issue. For me color always changes according to pb_colorProgress. Can you provide Android Version and Device manufacturer?

pakoito commented 9 years ago

Samsung Galaxy S4, Android 4.4.2

dmytrodanylyk commented 9 years ago

I just tried on Android 4.4.4 device, all seems to work. Can you install sample app from play store? Also can you check on emulator or another device?

pakoito commented 9 years ago

Xiaomi MI2-S with MIUI 6 (4.1.X) with the app from the store has the same issue.

An emulator is not an accurate representation of any device, I never use them for anything other than unitests and neither should you.

dmytrodanylyk commented 9 years ago

I have tested on several devices, Nexus 5, Nexus 7, Xperia S and Genymotion. So when you install sample app, and choose Action Button Progress sample, progress is green?

dmytrodanylyk commented 9 years ago

Link to video :)

pakoito commented 9 years ago

Your video is showing the problem too! Check the imgur link above, progress state -which if I understood correctly is Loading.. - is set to white background, yet the button still shows the same as idle. My original post has Loading blue but it shows as idle, green.

In the default sample idle is blue and loading is violet or purple, IIRC. If my color blindness is not kicking in, your video shows both as the same color.

dmytrodanylyk commented 9 years ago

Ok, I misunderstood you. So pb_colorProgress is used for button progress line, in btnSignIn.setMode(ActionProcessButton.Mode.PROGRESS); mode. So you can't change color of button in progress mode.

pakoito commented 9 years ago

Okay, can you please put this as a feature request then, please?

dmytrodanylyk commented 9 years ago

@pakoito yes, but I will not be able to update library for a while...

dmytrodanylyk commented 9 years ago

Created issue #35

pakoito commented 9 years ago

Great, thank you.