<Button
android:layout_width="wrap_content"
android:layout_height="40dp"
android:text="Explore"
android:id="@+id/btn_dialog"
android:gravity="center_vertical|center_horizontal"
android:layout_below="@+id/text_dialog"
android:layout_marginBottom="20dp"
android:layout_centerHorizontal="true"
android:textColor="#ffffff" />
This is my colors.xml file.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#00ccff</color>
<color name="colorPrimaryDark">#00ccff</color>
<color name="colorAccent">#00ccff</color>
<color name="darkPrimary">#212121</color>
<color name="darkPrimaryDark">#000000</color>
<color name="whitecolor">#FFFFFF</color>
<color name="switchcolor">#f0f0f0</color>
</resources>
The style file is given below:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
When I am trying to set the background color like this: android:background="#f0f0f0"
, there is no change in the background color. I am trying to fix for about an hour or so. Please any help is appreciated.