Open greenreader9 opened 3 months ago
Hello
Having some trouble implementing your code, I can't seem to change the color of the button, it always stays at the default that you have configured.
activity_name.xml:
activity_name.xml
<com.dd.processbutton.iml.ActionProcessButton android:id="@+id/signupButton" android:layout_width="match_parent" android:layout_height="48dp" android:layout_marginBottom="16dp" android:layout_marginTop="24dp" app:layout_constraintTop_toBottomOf="@+id/passwordEditText" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" android:text="@string/create_account" android:textColor="@android:color/white" android:textSize="18sp" custom:pb_colorNormal="@color/colorPrimary" custom:pb_colorPressed="@color/colorPrimaryVariant"/>
colorPrimary and colorPrimaryVariant are defined in colors.xml:
colorPrimary
colorPrimaryVariant
colors.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="colorPrimary">#BA85FB</color> <color name="colorPrimaryVariant"><![CDATA[@color/purple_700]]></color> <color name="colorOnPrimary">#FFFFFF</color> </resources>
activity.java:
activity.java
ProgressGenerator progressGenerator = new ProgressGenerator(this); ActionProcessButton signupButton = (ActionProcessButton) findViewById(R.id.signupButton); signupButton.setMode(ActionProcessButton.Mode.ENDLESS);
The button should be purple, but it is still blue:
Am I missing something in the XML file?
Thank you
![Uploading IMG20240830222205.jpg…]()
Looks like that image did not fully upload, can you try again?
Hello
Having some trouble implementing your code, I can't seem to change the color of the button, it always stays at the default that you have configured.
activity_name.xml
:colorPrimary
andcolorPrimaryVariant
are defined incolors.xml
:activity.java
:The button should be purple, but it is still blue:
Am I missing something in the XML file?
Thank you