#86 Is there anyway to get a significantly larger font on IOS and Android?

This commit is contained in:
EddyVerbruggen
2016-04-28 19:52:33 +02:00
parent 9ed9f018a7
commit dc6c537125
7 changed files with 36 additions and 30 deletions
@@ -90,6 +90,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 textSize = styling.optDouble("textSize", -1);
final double opacity = styling.optDouble("opacity", 0.8);
final int cornerRadius = styling.optInt("cornerRadius", 100);
final int horizontalPadding = styling.optInt("horizontalPadding", 50);
@@ -104,6 +105,9 @@ public class Toast extends CordovaPlugin {
final TextView toastTextView;
toastTextView = (TextView) toast.getView().findViewById(android.R.id.message);
toastTextView.setTextColor(Color.parseColor(textColor));
if (textSize > -1) {
toastTextView.setTextSize(textSize.floatValue());
}
toast.getView().setPadding(horizontalPadding, verticalPadding, horizontalPadding, verticalPadding);