Skip to content

Commit

Permalink
Add GuideView.setButtonTextColor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ade Fruandta committed Feb 22, 2019
1 parent 1a9dae9 commit 3042b53
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions showcase/src/main/java/com/happyfresh/showcase/GuideView.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.graphics.*;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.ColorInt;
import android.text.Spannable;
import android.view.MotionEvent;
import android.view.View;
Expand Down Expand Up @@ -402,6 +403,10 @@ public void setButtonBackground(Drawable drawable){
mMessageView.okButton.setBackground(drawable);
}

public void setButtonTextColor(@ColorInt int color){
mMessageView.okButton.setTextColor(color);
}

public void setTitlePadding(int paddingLeft, int paddingTop, int paddingRight, int paddingBottom){

paddingLeft = mMessageView.padding + paddingLeft;
Expand Down Expand Up @@ -472,6 +477,7 @@ public static class Builder {
private int buttonGravity;
private String buttonText;
private Drawable buttonBackground;
private Integer buttonTextColor;
private int paddingLeftTitle;
private int paddingRightTitle;
private int paddingTopTitle;
Expand Down Expand Up @@ -723,6 +729,11 @@ public Builder setButtonBackground(Drawable drawable){
this.buttonBackground = drawable;
return this;
}

public Builder setButtonTextColor(@ColorInt int color){
this.buttonTextColor = color;
return this;
}
/**
* changing inner circle size indicator
*
Expand Down Expand Up @@ -800,6 +811,9 @@ public GuideView build() {
if (buttonBackground != null) {
guideView.setButtonBackground(buttonBackground);
}
if (buttonTextColor != null) {
guideView.setButtonTextColor(buttonTextColor);
}
if(paddingLeftTitle !=0 || paddingTopTitle !=0 || paddingRightTitle !=0 || paddingBottomTitle !=0){
guideView.setTitlePadding(paddingLeftTitle,paddingTopTitle,paddingRightTitle,paddingBottomTitle);
}
Expand Down

0 comments on commit 3042b53

Please sign in to comment.