Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit 81bb0be

Browse files
Added missing string res for dialog builder
1 parent 4ce4c2a commit 81bb0be

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

library/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ext {
1313
siteUrl = 'https://github.com/Mordag/hitogo'
1414
gitUrl = 'https://github.com/Mordag/hitogo.git'
1515

16-
libraryVersion = '1.0.0-beta13'
16+
libraryVersion = '1.0.0-beta13.1'
1717

1818
developerId = 'mordag'
1919
developerName = 'Alexander Eggers'
@@ -34,7 +34,7 @@ android {
3434
defaultConfig {
3535
minSdkVersion 14
3636
targetSdkVersion 27
37-
versionName "1.0.0-beta13"
37+
versionName "1.0.0-beta13.1"
3838
consumerProguardFiles 'proguard-rules.pro'
3939
}
4040

library/src/main/java/org/hitogo/alert/dialog/DialogAlertBuilder.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.support.annotation.NonNull;
44
import android.support.annotation.Nullable;
5+
import android.support.annotation.StringRes;
56
import android.support.annotation.StyleRes;
67

78
import org.hitogo.button.core.Button;
@@ -74,6 +75,19 @@ public DialogAlertBuilder addButton(@NonNull String... buttonContent) {
7475
return this;
7576
}
7677

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+
7791
@NonNull
7892
public DialogAlertBuilder setStyle(@Nullable @StyleRes Integer dialogThemeResId) {
7993
this.dialogThemeResId = dialogThemeResId;

0 commit comments

Comments
 (0)