I'm trying to build an app and want to show error if someone didn't fill-up the form correctly. Can I change the style of each component in Android Studio using java to highlight the component.
What I've done so far is this:
1. in styles.xml file, I did declare a new style name errorstyle as following:
<style name="errorstyle" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:textColor">#f45c42</item>
</style>
2. secondly in java file I did try to use following code.
selectedDate.setTextAppearance(this, android.R.style.errorstyle);
And it gives me an error message in java file:
cannot resolve symbol 'errorstyle'
Any suggestions?