Question: I have a styles called Red and Green and I have an if statment to find out which to apply, but I don't know the code to actually apply a style from the java.

Answer: 
It is possible to apply styles programatically to TextViews using **setTextAppearance**(context, resid) method. (The resId of the style can be found in R.style.YourStyleName)
You can use the brand new Paris library to apply styles programmatically:

```
Paris.style(yourView).apply(condition ? R.style.Green : R.style.Red);

```

The only caveat is that not all attributes are supported (but many are and support can be added fairly easily by contributing to the library).

* [List of currently supported attributes](https://github.com/airbnb/paris/wiki/Supported-View-Types-and-Attributes)
* [Installation instructions](https://github.com/airbnb/paris/blob/master/README.md#installation)

Disclaimer: I'm the original author of the library.