Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToast.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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();
Expand Down