Skip to content

Commit

Permalink
Fixed setButtonCtaLabel() methods not working
Browse files Browse the repository at this point in the history
  • Loading branch information
heinrichreimer committed Jun 23, 2016
1 parent d784107 commit 5aebbcc
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.View;
import android.view.WindowManager;
Expand Down Expand Up @@ -388,8 +389,17 @@ private void finishIfNeeded() {
}
}
if (buttonCtaVisible) {
return Pair.create((CharSequence) getString(R.string.mi_label_button_cta),
new ButtonCtaClickListener());
if (buttonCtaLabelRes != 0) {
return Pair.create((CharSequence) getString(buttonCtaLabelRes),
new ButtonCtaClickListener());
}
if (!TextUtils.isEmpty(buttonCtaLabel)) {
return Pair.create(buttonCtaLabel, new ButtonCtaClickListener());
}
else {
return Pair.create((CharSequence) getString(R.string.mi_label_button_cta),
new ButtonCtaClickListener());
}
}
return null;
}
Expand Down

0 comments on commit 5aebbcc

Please sign in to comment.