I'm not sure this is the right forum on stack to ask this, it probably needs to be in a community wiki, but I'll ask here anyways.
I've searched for this topic and have not found anything, but over the years doing Android I've come across some usages of styles that make me uncomfortable and I'd like to get some feedback on best practices regarding writing styles in Android.
One example that I feel is wrong is this style which is used for
TextView in a particular layout:
<style name="historyHeroText" parent="normalText">
The style concerns itself with text, and alignment both regarding the inside, and outside of the element it styles.
layout_alignParentRight is specific to Views that are inside of a
RelativeLayout. Also, there seems to be a conflict between
textAlignment which in this case both specify the same behavior.
What types of things should a style concern itself with? If it's a style meant to be used on
TextView shouldn't it only concern itself with text styling and leave layout concerns for the layout file? What are some general best practices that you follow?
Also, what warrants pulling the properties out of the layout file into a style? It seems to me that if the properties are used only one place it does not warrant a style.