This repository was archived by the owner on Aug 10, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
src/main/java/org/hitogo/alert/dialog Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 13
13
siteUrl = ' https://github.com/Mordag/hitogo'
14
14
gitUrl = ' https://github.com/Mordag/hitogo.git'
15
15
16
- libraryVersion = ' 1.0.0-beta13'
16
+ libraryVersion = ' 1.0.0-beta13.1 '
17
17
18
18
developerId = ' mordag'
19
19
developerName = ' Alexander Eggers'
@@ -34,7 +34,7 @@ android {
34
34
defaultConfig {
35
35
minSdkVersion 14
36
36
targetSdkVersion 27
37
- versionName " 1.0.0-beta13"
37
+ versionName " 1.0.0-beta13.1 "
38
38
consumerProguardFiles ' proguard-rules.pro'
39
39
}
40
40
Original file line number Diff line number Diff line change 2
2
3
3
import android .support .annotation .NonNull ;
4
4
import android .support .annotation .Nullable ;
5
+ import android .support .annotation .StringRes ;
5
6
import android .support .annotation .StyleRes ;
6
7
7
8
import org .hitogo .button .core .Button ;
@@ -74,6 +75,19 @@ public DialogAlertBuilder addButton(@NonNull String... buttonContent) {
74
75
return this ;
75
76
}
76
77
78
+ @ NonNull
79
+ public DialogAlertBuilder addButton (@ StringRes int ... buttonContent ) {
80
+ for (int textRes : buttonContent ) {
81
+ Button button = Hitogo .with (getContainer ())
82
+ .asActionButton ()
83
+ .forClickOnlyAction ()
84
+ .setText (textRes )
85
+ .build ();
86
+ super .addButton (button );
87
+ }
88
+ return this ;
89
+ }
90
+
77
91
@ NonNull
78
92
public DialogAlertBuilder setStyle (@ Nullable @ StyleRes Integer dialogThemeResId ) {
79
93
this .dialogThemeResId = dialogThemeResId ;
You can’t perform that action at this time.
0 commit comments