Skip to content

Commit e8bbeec

Browse files
committed
Merge pull request #12 from pavlospt/master
Supporting custom Typeface
2 parents b0e1e51 + f26036e commit e8bbeec

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToast.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public LoadToast setTextColor(int color){
6363
return this;
6464
}
6565

66+
public LoadToast setTextTypeface(Typeface font){
67+
mView.setTextTypeface(font);
68+
return this;
69+
}
70+
6671
public LoadToast setBackgroundColor(int color){
6772
mView.setBackgroundColor(color);
6873
return this;

loadtoast/src/main/java/net/steamcrafted/loadtoast/LoadToastView.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ public void setTextColor(int color){
112112
textPaint.setColor(color);
113113
}
114114

115+
public void setTextTypeface(Typeface font){
116+
textPaint.setTypeface(font);
117+
}
118+
115119
public void setBackgroundColor(int color){
116120
backPaint.setColor(color);
117121
iconBackPaint.setColor(color);

0 commit comments

Comments
 (0)