The color of the Android control does not match the actual "solution"

Problem recurrence

  • The background color is set to green , but Buttonthe control is showing purple

insert image description here


solution

This is due to Thememodification, you only need to modify the properties themes.xmlin the configuration fileparent

  • If the file cannot be found, first change the project structure display Projectto

insert image description here

Original configuration:

<style name="Theme.AndroidWalkthrough" parent="Theme.MaterialComponents.DayNight.DarkActionBar">

After modification:

<style name="Theme.AndroidWalkthrough" parent="Theme.MaterialComponents.DayNight.Bridge">
    
<!-- option two -->
<style name="Theme.PROJECTNAME" parent="Theme.AppCompat.Light.NoActionBar">

insert image description here

Guess you like

Origin blog.csdn.net/Kideers/article/details/131328620