diff --git a/loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToast.java b/loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToast.java index 07c86a4..5bf4fcf 100644 --- a/loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToast.java +++ b/loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToast.java @@ -2,6 +2,7 @@ import android.app.Activity; import android.content.Context; +import android.graphics.Typeface; import android.util.Log; import android.view.View; import android.view.ViewGroup; @@ -63,6 +64,11 @@ public LoadToast setTextColor(int color){ return this; } + public LoadToast setTextTypeface(Typeface font){ + mView.setTextTypeface(font); + return this; + } + public LoadToast setBackgroundColor(int color){ mView.setBackgroundColor(color); return this; @@ -73,6 +79,11 @@ public LoadToast setProgressColor(int color){ return this; } + public LoadToast setTextSize(int size){ + mView.setTextSize(size); + return this; + } + public LoadToast show(){ if(!mInflated){ mShowCalled = true; diff --git a/loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToastView.java b/loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToastView.java index 5381872..aaeb9b0 100644 --- a/loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToastView.java +++ b/loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToastView.java @@ -8,6 +8,7 @@ import android.graphics.Path; import android.graphics.Rect; import android.graphics.RectF; +import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Build; import android.util.Log; @@ -112,6 +113,10 @@ public void setTextColor(int color){ textPaint.setColor(color); } + public void setTextTypeface(Typeface font){ + textPaint.setTypeface(font); + } + public void setBackgroundColor(int color){ backPaint.setColor(color); iconBackPaint.setColor(color); @@ -121,6 +126,11 @@ public void setProgressColor(int color){ loaderPaint.setColor(color); } + public void setTextSize(int size){ + size = dpToPx(size); + textPaint.setTextSize(size); + } + public void show(){ WIDTH_SCALE = 0f; if(cmp != null) cmp.removeAllUpdateListeners();