File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
library/src/main/java/com/heinrichreimersoftware/materialintro/app Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 29
29
import android .support .v4 .view .ViewCompat ;
30
30
import android .support .v4 .view .ViewPager ;
31
31
import android .support .v7 .app .AppCompatActivity ;
32
+ import android .text .TextUtils ;
32
33
import android .util .TypedValue ;
33
34
import android .view .View ;
34
35
import android .view .WindowManager ;
@@ -388,8 +389,17 @@ private void finishIfNeeded() {
388
389
}
389
390
}
390
391
if (buttonCtaVisible ) {
391
- return Pair .create ((CharSequence ) getString (R .string .mi_label_button_cta ),
392
- new ButtonCtaClickListener ());
392
+ if (buttonCtaLabelRes != 0 ) {
393
+ return Pair .create ((CharSequence ) getString (buttonCtaLabelRes ),
394
+ new ButtonCtaClickListener ());
395
+ }
396
+ if (!TextUtils .isEmpty (buttonCtaLabel )) {
397
+ return Pair .create (buttonCtaLabel , new ButtonCtaClickListener ());
398
+ }
399
+ else {
400
+ return Pair .create ((CharSequence ) getString (R .string .mi_label_button_cta ),
401
+ new ButtonCtaClickListener ());
402
+ }
393
403
}
394
404
return null ;
395
405
}
You can’t perform that action at this time.
0 commit comments