leandroBorgesFerreira/LoadingButtonAndroid

Property colorButtonNormal not working in CircularProgressButton

Opened this issue · 1 comments

I created a style by changing the colorButtonNormal property:

<style name="AppTheme.Button.
        <item name="colorButtonNormal">@color/colorSuccess</item>
</style>

Using this on a normal button works correctly:

<Button
            android:id="@+id/btnCompletePayment"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/component_margin"
            android:text="@string/text_complete_payment"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/layoutInformation"
            app:theme="@style/AppTheme.Button.Success" />

However, for CircularProgressButton, the button color does not change:

<br.com.simplepass.loadingbutton.customViews.CircularProgressButton
        android:id="@+id/btnCompletePayment"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/component_margin"
        android:text="@string/text_complete_payment"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/layoutInformation"
        app:theme="@style/AppTheme.Button.Success"
        app:spinning_bar_color="@color/white"
        app:spinning_bar_padding="4dp"
        app:spinning_bar_width="2dp" />

Does anyone know what I should do?

Hi Gabriel... This button currently doesn't have support for setting the background using themes. That's my mistake. For now, you'll have to use the background.

I'll look for some time to add support for it.