From 6ba778dd22076d084b4f437fd9ca659d31943193 Mon Sep 17 00:00:00 2001
From: Sino <SinoBoeckmann@users.noreply.github.com>
Date: Tue, 16 Feb 2016 17:00:52 +0100
Subject: [PATCH] option to set the text color of the toast

---
 src/android/nl/xservices/plugins/Toast.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/android/nl/xservices/plugins/Toast.java b/src/android/nl/xservices/plugins/Toast.java
index 580daac..b13907c 100644
--- a/src/android/nl/xservices/plugins/Toast.java
+++ b/src/android/nl/xservices/plugins/Toast.java
@@ -92,6 +92,7 @@ public class Toast extends CordovaPlugin {
 
             // the defaults mimic the default toast as close as possible
             final String backgroundColor = styling.optString("backgroundColor", "#333333");
+            final String textColor = styling.optString("textColor", "#ffffff");
             final double opacity = styling.optDouble("opacity", 0.8);
             final int cornerRadius = styling.optInt("cornerRadius", 100);
             final int horizontalPadding = styling.optInt("horizontalPadding", 50);
@@ -102,6 +103,10 @@ public class Toast extends CordovaPlugin {
             shape.setAlpha((int)(opacity * 255)); // 0-255, where 0 is an invisible background
             shape.setColor(Color.parseColor(backgroundColor));
             toast.getView().setBackground(shape);
+            
+            text = (TextView) toast.getView().findViewById(android.R.id.message);
+            text.setTextColor(textColor);
+            
             toast.getView().setPadding(horizontalPadding, verticalPadding, horizontalPadding, verticalPadding);
 
             // this gives the toast a very subtle shadow on newer devices