-1
Hello, all right? I’m starting now in Mobile Development. My problem is the following:
I created a simple app for testing, in Android Studio it gets the colors the right way I want, but when I install it on my phone, yellow gets a negative effect and the color is almost black instead of yellow. I’m having trouble solving it. The whole project was created by the IDE and I just modified it... The Styles file didn’t exist, so I created one from scratch. Follow him down:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" >
<!-- Create your theme here-->
<item name="colorPrimary">@color/white</item>
</style>
<style name="Operators_Button">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:background">@color/orange_red</item>
<item name="android:textColor">@color/white</item>
<item name="android:textSize">28dp</item>
<item name="android:gravity">center</item>
<item name="android:textStyle">bold</item>
<item name="android:layout_margin">0.5dp</item>
</style>
<style name="Numbers_Button">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:background">@color/yellow</item>
<item name="android:textColor">@color/black</item>
<item name="android:textSize">28dp</item>
<item name="android:gravity">center</item>
<item name="android:textStyle">bold</item>
<item name="android:layout_margin">0.5dp</item>
</style>
</resources>```
This is device setup, you can’t go against it. If it were possible, it would be a disrespect to the user’s choice.
– Rafael Tavares