Check for setTextDirection API level

Only try to change the textdirection if we are on API >= 17. Before, the dialog would still appear - this just removes a java.lang.NoSuchMethodError.